diff --git a/gradle.properties b/gradle.properties index 73f5b705b..c0804abfe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,18 +6,18 @@ org.gradle.daemon = false # mod version info mod_version = 0.3.2c minecraft_version = 1.16.5 -forge_version = 36.1.32 +forge_version = 36.2.0 # build dependency versions forgegradle_version = 4.1.+ mixingradle_version = 0.7-SNAPSHOT -shadow_version = 5.2.0 +shadow_version = 6.1.0 cursegradle_version = 1.4.0 # dependency versions registrate_version = 1.0.4 -flywheel_version = 1.16-0.1.1.24 -jei_version = 7.7.0.106 +flywheel_version = 1.16-0.1.1.26 +jei_version = 7.7.1.110 # curseforge information projectId = 328085 diff --git a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipeBuilder.java b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipeBuilder.java index df49e6eb6..c1095a0b4 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipeBuilder.java +++ b/src/main/java/com/simibubi/create/content/contraptions/itemAssembly/SequencedAssemblyRecipeBuilder.java @@ -98,7 +98,6 @@ public class SequencedAssemblyRecipeBuilder { public DataGenResult(SequencedAssemblyRecipe recipe, List recipeConditions) { this.recipeConditions = recipeConditions; this.recipe = recipe; - recipe.getId(); this.id = new ResourceLocation(recipe.getId().getNamespace(), AllRecipeTypes.SEQUENCED_ASSEMBLY.getId().getPath() + "/" + recipe.getId().getPath()); this.serializer = (SequencedAssemblyRecipeSerializer) recipe.getSerializer(); diff --git a/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoCannonProjectileTypes.java b/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoCannonProjectileTypes.java index 1d8fb49a5..52c847bd7 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoCannonProjectileTypes.java +++ b/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoCannonProjectileTypes.java @@ -46,6 +46,8 @@ import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.event.ForgeEventFactory; +import net.minecraftforge.event.entity.living.EntityTeleportEvent; import net.minecraftforge.registries.IRegistryDelegate; public class PotatoCannonProjectileTypes { @@ -447,14 +449,10 @@ public class PotatoCannonProjectileTypes { double teleportY = MathHelper.clamp(entityY + (livingEntity.getRandom().nextInt((int) teleportDiameter) - (int) (teleportDiameter / 2)), 0.0D, world.getHeight() - 1); double teleportZ = entityZ + (livingEntity.getRandom().nextDouble() - 0.5D) * teleportDiameter; - /* Usable as soon as lowest supported forge > 36.1.3 */ - -// EntityTeleportEvent.ChorusFruit event = ForgeEventFactory.onChorusFruitTeleport(livingEntity, teleportX, teleportY, teleportZ); -// if (event.isCanceled()) -// return; -// if (livingEntity.attemptTeleport(event.getTargetX(), event.getTargetY(), event.getTargetZ(), true)) { - - if (livingEntity.randomTeleport(teleportX, teleportY, teleportZ, true)) { + EntityTeleportEvent.ChorusFruit event = ForgeEventFactory.onChorusFruitTeleport(livingEntity, teleportX, teleportY, teleportZ); + if (event.isCanceled()) + return false; + if (livingEntity.randomTeleport(event.getTargetX(), event.getTargetY(), event.getTargetZ(), true)) { if (livingEntity.isPassenger()) livingEntity.stopRiding(); diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderRegistry.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderRegistry.java index ffe9fc99e..ee420a6f4 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderRegistry.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderRegistry.java @@ -2,6 +2,7 @@ package com.simibubi.create.foundation.ponder; import java.io.BufferedInputStream; import java.io.DataInputStream; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; @@ -140,15 +141,12 @@ public class PonderRegistry { String path = "ponder/" + location.getPath() + ".nbt"; ResourceLocation location1 = new ResourceLocation(namespace, path); - if (!resourceManager.hasResource(location1)) { - Create.LOGGER.error("Ponder schematic missing: " + location1); - return new Template(); - } - try { - IResource resource = resourceManager.getResource(location1); + try (IResource resource = resourceManager.getResource(location1)) { return loadSchematic(resource.getInputStream()); + } catch (FileNotFoundException e) { + Create.LOGGER.error("Ponder schematic missing: " + location1, e); } catch (IOException e) { - Create.LOGGER.error("Failed to read ponder schematic: " + path, e); + Create.LOGGER.error("Failed to read ponder schematic: " + location1, e); } return new Template(); } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 123163fb6..7339a8d9c 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -18,7 +18,7 @@ Technology that empowers the player.''' [[dependencies.create]] modId="forge" mandatory=true - versionRange="[36.1.0,)" + versionRange="[36.2.0,)" ordering="NONE" side="BOTH"