Skip to content

Commit

Permalink
fix: apple hard candy + step assist
Browse files Browse the repository at this point in the history
  • Loading branch information
bruberu committed Dec 22, 2024
1 parent eeff7f2 commit 45e9ce7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/main/java/gregtechfoodoption/block/GTFOBerryBush.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

public class GTFOBerryBush extends GTFOCrop {
public static final PropertyInteger EFFICIENCY_GTFO = PropertyInteger.create("efficiency", 0, 4);
private static final AxisAlignedBB SMALL_AABB = new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 0.5D, 0.75D);
private static final AxisAlignedBB SMALL_AABB = new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 0.5625D, 0.75D);
private static final AxisAlignedBB LARGE_AABB = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.9375D, 0.9375D);
private static final AxisAlignedBB STEM_AABB = new AxisAlignedBB(0.4325D, 0.0D, 0.4325D, 0.5675D, 0.25D, 0.5675D);

Expand Down Expand Up @@ -144,12 +144,13 @@ public void onEntityCollision(World worldIn, BlockPos pos, IBlockState state, En
double distanceFromCenter = entityIn.getDistanceSq(pos.getX() + 0.5D, pos.getY(), pos.getZ() + 0.5D);
distanceFromCenter += 0.5; // no singularity going on here
distanceFromCenter /= 4;
entityIn.stepHeight = 0.125F;
entityIn.motionX *= distanceFromCenter;
entityIn.motionY *= distanceFromCenter;
entityIn.motionZ *= distanceFromCenter;
}



public GTFOBerryBush setThorny(boolean thorny) {
isThorny = thorny;
return this;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gregtechfoodoption/item/GTFOMetaItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ public void registerSubItems() {
.nutrients(0, 0, 0.5f, 0, 0));
MINERAL_WATER = addItem(12, "food.mineral_water").addComponents(new GTFOFoodStats(GTFOConfig.gtfoFoodConfig.mineralWaterHunger, GTFOConfig.gtfoFoodConfig.mineralWaterSaturation, true, true, USED_DEWAR_FLASK.getStackForm(1),
new RandomPotionEffect(CreativityPotion.INSTANCE, 5000, 0, 0)));
APPLE_HARD_CANDY = addItem(14, "food.apple_hard_candy").addComponents(new GTFOFoodStats(GTFOConfig.gtfoFoodConfig.hardCandyHunger, GTFOConfig.gtfoFoodConfig.hardCandySaturation, true, false, ItemStack.EMPTY,
APPLE_HARD_CANDY = addItem(14, "food.apple_hard_candy").addComponents(new GTFOFoodStats(GTFOConfig.gtfoFoodConfig.hardCandyHunger, GTFOConfig.gtfoFoodConfig.hardCandySaturation, false, false, ItemStack.EMPTY,
new RandomPotionEffect(MobEffects.REGENERATION, 1200, 1, 50))
.setEatingDuration(24)
.nutrients(0, 0.5f, 0, 0, 0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public void performEffect(EntityLivingBase entity, int amplifier) {
entity.stepHeight = 0.9F;
}
else {
entity.stepHeight = amplifier + (1F / 16F);//PATH BLOCKS etc are 1/16th downif MY feature turns this on, then do it
entity.stepHeight = amplifier + (1F / 16F);//PATH BLOCKS etc are 1/16th down
// if MY feature turns this on, then do it
}
}
}
Expand Down

0 comments on commit 45e9ce7

Please sign in to comment.