diff --git a/gradle.properties b/gradle.properties index 121941b05..0024d1cd3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ org.gradle.daemon=false mod_id=cyclic curse_id=239286 -mod_version=1.12.4-SNAPSHOT +mod_version=1.12.4 # NEO FORGED forge_version=47.1.65 diff --git a/src/main/java/com/lothrazar/cyclic/CyclicLogger.java b/src/main/java/com/lothrazar/cyclic/CyclicLogger.java index 77b6ceb44..1c8bd10bc 100644 --- a/src/main/java/com/lothrazar/cyclic/CyclicLogger.java +++ b/src/main/java/com/lothrazar/cyclic/CyclicLogger.java @@ -1,6 +1,5 @@ package com.lothrazar.cyclic; -import org.apache.logging.log4j.Level; import org.apache.logging.log4j.Logger; import net.minecraftforge.common.ForgeConfigSpec.BooleanValue; @@ -21,9 +20,6 @@ public void error(String string, Object e) { logger.error(string, e); } - private void debug(String... strings) { - logger.log(Level.DEBUG, strings); - } public void info(String string) { //default for all releases is false to prevent spam-logs slipping out if (LOGINFO.get()) { diff --git a/src/main/java/com/lothrazar/cyclic/item/food/AppleBuffs.java b/src/main/java/com/lothrazar/cyclic/item/food/AppleBuffs.java index 2c4b4b61f..31b9f01cb 100644 --- a/src/main/java/com/lothrazar/cyclic/item/food/AppleBuffs.java +++ b/src/main/java/com/lothrazar/cyclic/item/food/AppleBuffs.java @@ -9,7 +9,6 @@ import net.minecraft.network.chat.MutableComponent; import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; @@ -40,10 +39,6 @@ public void appendHoverText(ItemStack stack, Level worldIn, List tool @Override public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity entityLiving) { - if (entityLiving instanceof Player) { - // TOOD - ((Player) entityLiving).getCooldowns().addCooldown(this, 30); - } return super.finishUsingItem(stack, worldIn, entityLiving); } } diff --git a/src/main/java/com/lothrazar/cyclic/item/food/EdibleFlightItem.java b/src/main/java/com/lothrazar/cyclic/item/food/EdibleFlightItem.java index 700d7c8d9..abc9da413 100644 --- a/src/main/java/com/lothrazar/cyclic/item/food/EdibleFlightItem.java +++ b/src/main/java/com/lothrazar/cyclic/item/food/EdibleFlightItem.java @@ -20,7 +20,7 @@ public class EdibleFlightItem extends AppleBuffs { public static IntValue TICKS; public EdibleFlightItem(Properties properties) { - super(properties.rarity(Rarity.RARE).food(new FoodProperties.Builder().nutrition(3).saturationMod(0).alwaysEat().build())); + super(properties.rarity(Rarity.RARE).food(new FoodProperties.Builder().nutrition(1).saturationMod(0).alwaysEat().build())); } @Override @@ -30,8 +30,15 @@ public void appendHoverText(ItemStack stack, Level worldIn, List tool } @Override - public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity entityLiving) { - entityLiving.addEffect(new MobEffectInstance(PotionEffectRegistry.FLIGHT.get(), TICKS.get())); - return super.finishUsingItem(stack, worldIn, entityLiving); + public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity entity) { + final var flight = PotionEffectRegistry.FLIGHT.get(); + if (entity.hasEffect(flight)) { + MobEffectInstance currentEff = entity.getEffect(flight); + currentEff.update(new MobEffectInstance(PotionEffectRegistry.FLIGHT.get(), currentEff.getDuration() + TICKS.get())); // update to merge together new and existing timers + } + else { + entity.addEffect(new MobEffectInstance(flight, TICKS.get())); + } + return super.finishUsingItem(stack, worldIn, entity); } } diff --git a/update.json b/update.json index dbd9f34f8..b9484e826 100644 --- a/update.json +++ b/update.json @@ -7,7 +7,7 @@ "1.19.2-latest":"1.8.2", "1.19.3-latest":"1.9.0", "1.19.4-latest":"1.10.2", - "1.20.1-latest":"1.12.3" + "1.20.1-latest":"1.12.4" }, "1.16.5": { @@ -158,6 +158,6 @@ ,"1.12.1":"Fix transparency of several blocks (Terra Glass and both Clouds). Fix blockrendering/transparency along edges of cyclic:lamp (waxed lamp). Fix rendering of cyclic:laser_cannon beams #2295 and block highlights for Building Scepters and Location GPS. Fix 'Apple of lofty stature' not syncing when you rejoin the world, meaning the Step Height Disabled wasnt turning it off #2296 #2258. Exp boost no longer gives XP if the original harvest had a zero drop (stone/dirt etc) fix #2283. Fix render_type of Melter and Solidifier. Melter and Solidifier now drain the 'rf per tick' from recipe constrantly, instead of one batch drain at the end (and fix bug #2284) " ,"1.20.2":"For ease of use and better visuals, and to better match modern rendering pipelines, the Shape Data card, Building Scepters and the Block Randomizer now uses a block-outline wireframe method to hilight blocks instead of rendering cube-faces (for example, the GPS data card still uses the cube-faces render and not wireframe). (This update ports some features that had previously been exlusive to the mc 1.16.5-1.15.12 thru 1.16.5-1.15.21; all are listed below). New configs: [cyclic.enchantment.disarm] now has 'ignoredMobs' and 'percentPerLevel', [cyclic.items.tile_transporter] now has 'overrideChestSingle', read on or see cyclic.yml for more details. PR #1976 by metalshark :Item, Energy, and Fluid Cables now have Increased performance (compile time optimisations, reduction in cyclomatic complexity and removal of redundant checks). PR #1994 by 'metalshark' Fixes issue #1992. Merge pull request #2013 from metalshark : Add caching of packager recipes and move static methods out of main class for scaling. Merge pull request #2011 from metalshark : Invalidate capabilities when declaring them. #1933 Sack of Holding chest placement override added, with new config to revert back to legacy behavior if desired (overrideChestSingle). #2168 fix bug where ender shelf sometimes would not save contents when mined after exiting reloading world when client data desyncs. Added a percentage config and ignorelist config for cyclic:disarm enchantment (disarmPercentPerLevel, disarmIngoredMobs), resolves it dropping your copied weapon from alexsmobs:mimicube #2249. Fix #1878 layered and/or logic for multiple wireless transmitters on the same node. Now all git branches can be merged from mc-1.16.5 downstream to mc-1.20.1 and future updates as well." ,"1.20.3":"Requires flib-0.0.10. Fix preview rendering #2317. Machines now have an alternate render preview option. Recipe balance changes applied (only mc 1.20.1+). Fix #2297 shield textures. " - ,"1.20.4": "" + ,"1.20.4": "Remove eating cooldown on some foods. Glistering Chorus Fruit is now stackable again like before (potion time +stacks up #2309). CraftTweaker zenscript support added to the 5 cyclic recipe types, see scripts folder in this link for examples https://github.com/Lothrazar/Cyclic/tree/trunk/1.20/examples " } }