diff --git a/examples/config/cyclic.toml b/examples/config/cyclic.toml index a5bd8d411..a7975a5f6 100644 --- a/examples/config/cyclic.toml +++ b/examples/config/cyclic.toml @@ -534,7 +534,7 @@ ##################################################################################### [cyclic.logging] # Unblock info logs; very spammy; can be useful for testing certain issues - info = false + info = true ##################################################################################### # Item specific configs diff --git a/gradle.properties b/gradle.properties index a6554f8a4..b923434ab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -# Sets default memory used for gradle commands. Can be overridden by user or command line properties. +c# Sets default memory used for gradle commands. Can be overridden by user or command line properties. # This is required to provide enough memory for the Minecraft decompilation process. org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false @@ -6,7 +6,7 @@ org.gradle.daemon=false mod_id=cyclic -mod_version=1.13.2 +mod_version=1.13.3 curse_id=239286 diff --git a/src/main/java/com/lothrazar/cyclic/ModCyclic.java b/src/main/java/com/lothrazar/cyclic/ModCyclic.java index 9b5534994..93e2a31d3 100644 --- a/src/main/java/com/lothrazar/cyclic/ModCyclic.java +++ b/src/main/java/com/lothrazar/cyclic/ModCyclic.java @@ -61,4 +61,8 @@ public ModCyclic() { LootModifierRegistry.LOOT.register(bus); ForgeMod.enableMilkFluid(); } + + public static void log(String string) { + LOGGER.info(string); + } } diff --git a/src/main/java/com/lothrazar/cyclic/block/melter/BlockMelter.java b/src/main/java/com/lothrazar/cyclic/block/melter/BlockMelter.java index 6d9afddd1..eae4e8849 100644 --- a/src/main/java/com/lothrazar/cyclic/block/melter/BlockMelter.java +++ b/src/main/java/com/lothrazar/cyclic/block/melter/BlockMelter.java @@ -23,6 +23,7 @@ public class BlockMelter extends BlockCyclic { public BlockMelter(Properties properties) { super(properties.strength(1.2F).noOcclusion()); this.setHasGui(); + this.setHasFluidInteract(); } @Override @@ -61,6 +62,11 @@ public BlockEntityTicker getTicker(Level world, Block return createTickerHelper(type, TileRegistry.MELTER.get(), world.isClientSide ? TileMelter::clientTick : TileMelter::serverTick); } + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(LIT); + } + @Override public boolean shouldDisplayFluidOverlay(BlockState state, BlockAndTintGetter world, BlockPos pos, FluidState fluidState) { return true; @@ -70,9 +76,4 @@ public boolean shouldDisplayFluidOverlay(BlockState state, BlockAndTintGetter wo public void registerClient() { MenuScreens.register(MenuTypeRegistry.MELTER.get(), ScreenMelter::new); } - - @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(LIT); - } } diff --git a/src/main/java/com/lothrazar/cyclic/block/melter/TileMelter.java b/src/main/java/com/lothrazar/cyclic/block/melter/TileMelter.java index 6a3961e17..82b7ee8e5 100644 --- a/src/main/java/com/lothrazar/cyclic/block/melter/TileMelter.java +++ b/src/main/java/com/lothrazar/cyclic/block/melter/TileMelter.java @@ -1,7 +1,6 @@ package com.lothrazar.cyclic.block.melter; import java.util.List; -import java.util.function.Predicate; import com.lothrazar.cyclic.block.TileBlockEntityCyclic; import com.lothrazar.cyclic.capabilities.block.FluidTankBase; import com.lothrazar.cyclic.registry.BlockRegistry; @@ -40,7 +39,7 @@ static enum Fields { static final int MAX = 64000; public static final int CAPACITY = 64 * FluidType.BUCKET_VOLUME; public static final int TRANSFER_FLUID_PER_TICK = FluidType.BUCKET_VOLUME / 20; - public FluidTankBase tank = new FluidTankBase(this, CAPACITY, isFluidValid()); + FluidTankBase tank = new FluidTankBase(this, CAPACITY, p -> true); CustomEnergyStorage energy = new CustomEnergyStorage(MAX, MAX); ItemStackHandler inventory = new ItemStackHandler(2); private LazyOptional energyCap = LazyOptional.of(() -> energy); @@ -128,10 +127,6 @@ public int getField(int field) { return 0; } - public Predicate isFluidValid() { - return p -> true; - } - @Override public Component getDisplayName() { return BlockRegistry.MELTER.get().getName(); diff --git a/src/main/java/com/lothrazar/cyclic/block/solidifier/TileSolidifier.java b/src/main/java/com/lothrazar/cyclic/block/solidifier/TileSolidifier.java index dfcdcd2f3..55b7e81b8 100644 --- a/src/main/java/com/lothrazar/cyclic/block/solidifier/TileSolidifier.java +++ b/src/main/java/com/lothrazar/cyclic/block/solidifier/TileSolidifier.java @@ -40,7 +40,7 @@ static enum Fields { public static final int CAPACITY = 64 * FluidType.BUCKET_VOLUME; public static final int TRANSFER_FLUID_PER_TICK = FluidType.BUCKET_VOLUME / 20; private RecipeSolidifier currentRecipe; - FluidTankBase tank; + FluidTankBase tank = new FluidTankBase(this, CAPACITY, p -> true); ItemStackHandler inputSlots = new ItemStackHandler(3); ItemStackHandler outputSlots = new ItemStackHandler(1); private ItemStackHandlerWrapper inventory = new ItemStackHandlerWrapper(inputSlots, outputSlots); @@ -52,7 +52,7 @@ static enum Fields { public TileSolidifier(BlockPos pos, BlockState state) { super(TileRegistry.SOLIDIFIER.get(), pos, state); - tank = new FluidTankBase(this, CAPACITY, p -> true); + } public static void serverTick(Level level, BlockPos blockPos, BlockState blockState, TileSolidifier e) { @@ -230,9 +230,7 @@ private boolean tryProcessRecipe() { inputSlots.getStackInSlot(0).shrink(1); inputSlots.getStackInSlot(1).shrink(1); inputSlots.getStackInSlot(2).shrink(1); - // if (!level.isClientSide()) { // only drain serverside to avoid desync issues # not needed anymore with above fix tank.drain(this.currentRecipe.fluidIngredient.getAmount(), FluidAction.EXECUTE); - // } outputSlots.insertItem(0, currentRecipe.getResultItem(level.registryAccess()), false); updateComparatorOutputLevel(); return true; diff --git a/src/main/java/com/lothrazar/cyclic/enchant/StepEnchant.java b/src/main/java/com/lothrazar/cyclic/enchant/StepEnchant.java index 47885a949..40f724754 100644 --- a/src/main/java/com/lothrazar/cyclic/enchant/StepEnchant.java +++ b/src/main/java/com/lothrazar/cyclic/enchant/StepEnchant.java @@ -102,14 +102,12 @@ public void onEntityUpdate(LivingTickEvent event) { int level = 0; if (armor.isEmpty() == false && EnchantmentHelper.getEnchantments(armor) != null && EnchantmentHelper.getEnchantments(armor).containsKey(this)) { - //todo: maybe any armor? level = EnchantmentHelper.getEnchantments(armor).get(this); } if (level > 0) { turnOn(player, armor); } else { - // ModCyclic.log(" level " + level + " and " + armor.getOrCreateTag().getBoolean(NBT_ON)); turnOff(player, armor); } } @@ -117,7 +115,6 @@ public void onEntityUpdate(LivingTickEvent event) { private void turnOn(Player player, ItemStack armor) { player.getPersistentData().putBoolean(NBT_ON, true); AttributesUtil.enableStepHeight(player); - // ModCyclic.log("ON " + player.getPersistentData().getBoolean(NBT_ON)); } private void turnOff(Player player, ItemStack armor) { diff --git a/src/main/java/com/lothrazar/cyclic/enchant/TravellerEnchant.java b/src/main/java/com/lothrazar/cyclic/enchant/TravellerEnchant.java index fa679f7a0..6a1b68cc4 100644 --- a/src/main/java/com/lothrazar/cyclic/enchant/TravellerEnchant.java +++ b/src/main/java/com/lothrazar/cyclic/enchant/TravellerEnchant.java @@ -113,14 +113,14 @@ public void onEntityUpdate(LivingDamageEvent event) { } int level = getCurrentArmorLevelSlot(event.getEntity(), EquipmentSlot.LEGS); DamageSource source = event.getSource(); // .type(); - DamageSources bullshit = event.getEntity().level().damageSources(); - if (level > 0 && (source == bullshit.cactus() - || source == bullshit.flyIntoWall() - || source == bullshit.sweetBerryBush() - || source == bullshit.sting(null))) { + DamageSources sourcesList = event.getEntity().level().damageSources(); + if (level > 0 && (source == sourcesList.cactus() + || source == sourcesList.flyIntoWall() + || source == sourcesList.sweetBerryBush() + || source == sourcesList.sting(null))) { event.setAmount(0.1F); } - if (level > 0 && source == bullshit.fall()) { + if (level > 0 && source == sourcesList.fall()) { //normal is zero damage up to 3 distance. 1 damage (half heart) at 4 distance. and each distance up goes up by that // so 8 fall damage would be 5 damage if (event.getEntity().fallDistance <= 8) { diff --git a/src/main/java/com/lothrazar/cyclic/filesystem/CyclicFile.java b/src/main/java/com/lothrazar/cyclic/filesystem/CyclicFile.java index 5336aea19..d03ef3289 100644 --- a/src/main/java/com/lothrazar/cyclic/filesystem/CyclicFile.java +++ b/src/main/java/com/lothrazar/cyclic/filesystem/CyclicFile.java @@ -16,6 +16,7 @@ public class CyclicFile { public boolean storageVisible = false; public boolean todoVisible = false; public boolean stepHeight = false; + public boolean stepHeightForceOff; // revived the latch used in 1.16.5 public List todoTasks = new ArrayList<>(); public int spectatorTicks = 0; // first 27 slots are for inventory cake storage. remaining unused @@ -36,6 +37,7 @@ public void read(CompoundTag tag) { spectatorTicks = tag.getInt("spectatorTicks"); storageVisible = tag.getBoolean("storageVisible"); stepHeight = tag.getBoolean("stepHeight"); + stepHeightForceOff = tag.getBoolean("stepHeightForceOff"); if (tag.contains("tasks")) { ListTag glist = tag.getList("tasks", Tag.TAG_COMPOUND); for (int i = 0; i < glist.size(); i++) { @@ -50,6 +52,7 @@ public CompoundTag write() { tag.put(NBTINV, inventory.serializeNBT()); tag.putInt("spectatorTicks", spectatorTicks); tag.putBoolean("stepHeight", stepHeight); + tag.putBoolean("stepHeightForceOff", stepHeightForceOff); tag.putBoolean("storageVisible", storageVisible); ListTag glist = new ListTag(); int i = 0; @@ -65,5 +68,8 @@ public CompoundTag write() { public void toggleStepHeight() { this.stepHeight = !this.stepHeight; + if (!this.stepHeight) { + this.stepHeightForceOff = true; + } } } diff --git a/src/main/java/com/lothrazar/cyclic/item/food/LoftyStatureApple.java b/src/main/java/com/lothrazar/cyclic/item/food/LoftyStatureApple.java index f6ed91172..6f6e5b7be 100644 --- a/src/main/java/com/lothrazar/cyclic/item/food/LoftyStatureApple.java +++ b/src/main/java/com/lothrazar/cyclic/item/food/LoftyStatureApple.java @@ -1,5 +1,6 @@ package com.lothrazar.cyclic.item.food; +import com.lothrazar.cyclic.ModCyclic; import com.lothrazar.cyclic.event.PlayerDataEvents; import com.lothrazar.cyclic.filesystem.CyclicFile; import com.lothrazar.cyclic.item.ItemBaseCyclic; @@ -58,7 +59,9 @@ public static void onUpdate(Player player) { AttributesUtil.enableStepHeight(player); } else { - AttributesUtil.disableStepHeight(player); + if (datFile.stepHeightForceOff) { + AttributesUtil.disableStepHeight(player); + } } } } diff --git a/src/main/resources/data/cyclic/recipes/solidifier/clay.json b/src/main/resources/data/cyclic/recipes/solidifier/clay.json index 56d78d236..e0bb68fcc 100644 --- a/src/main/resources/data/cyclic/recipes/solidifier/clay.json +++ b/src/main/resources/data/cyclic/recipes/solidifier/clay.json @@ -8,7 +8,7 @@ "tag": "forge:gravel" }], "mix": { - "fluid": "minecraft:water", + "tag": "forge:biomass", "count": 1000 }, "energy": { diff --git a/src/main/resources/data/cyclic/recipes/solidifier/rooted_dirt.json b/src/main/resources/data/cyclic/recipes/solidifier/rooted_dirt.json new file mode 100644 index 000000000..85a1dbef9 --- /dev/null +++ b/src/main/resources/data/cyclic/recipes/solidifier/rooted_dirt.json @@ -0,0 +1,20 @@ +{ + "type": "cyclic:solidifier", + "ingredients":[{ + "item": "minecraft:dirt" + },{ + "tag": "minecraft:leaves" + }], + "mix": { + "tag": "forge:biomass", + "count": 50 + }, + "energy": { + "rfpertick": 500, + "ticks": 20 + }, + "result": { + "item": "minecraft:rooted_dirt", + "count": 1 + } +} \ No newline at end of file diff --git a/update.json b/update.json index 7c0cda541..802e7f5ec 100644 --- a/update.json +++ b/update.json @@ -190,5 +190,6 @@ ,"1.13.1":"Fixed some visual glitches" ,"1.13.2":"Fix patchouli Guidebook doesn't show in JEI (and creative tab). Fix Sleeping Bag Disconnect with fully charged bow #2446. Two recipes have updated to use tag-ingredients forge:storage_blocks/ender_eye forge:storage_blocks/ender_pearl instead of item ids (this makes no difference to players experience). Re-added/Ported the alternate recipe for Tempered Dark Glass using obsidian and black stained glass" + ,"1.13.3":"You can now use a bucket on the Melter machine. Fix Step Height enchantment. Add recipe in the Solidifier for Rooted Dirt" } }