From f67a61290fa2bba04eb3198473df66277c7e7d07 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Tue, 6 Aug 2019 19:00:51 +0200 Subject: [PATCH 1/3] Forge Proofing - Updated to Forge 28.0.45, Fixes #5 - Tidied up mods.toml and build.gradle --- build.gradle | 78 +++++-------------- .../simibubi/create/AdvancementListener.java | 6 +- .../com/simibubi/create/AllContainers.java | 4 +- .../java/com/simibubi/create/AllItems.java | 4 +- .../java/com/simibubi/create/AllRecipes.java | 4 +- .../simibubi/create/AllSpecialTextures.java | 4 +- src/main/java/com/simibubi/create/Create.java | 14 +++- .../create/foundation/gui/ScreenOpener.java | 2 +- .../foundation/utility/FilesHelper.java | 2 +- .../placementHandgun/BuilderGunHandler.java | 5 +- .../BuilderGunUpgradeRecipe.java | 5 ++ .../block/SchematicannonScreen.java | 3 +- .../client/BlueprintAndQuillHandler.java | 7 +- .../schematics/client/BlueprintHandler.java | 5 +- .../schematics/client/SchematicHologram.java | 7 +- .../modules/symmetry/SymmetryHandler.java | 5 +- src/main/resources/META-INF/mods.toml | 57 +++++--------- 17 files changed, 94 insertions(+), 118 deletions(-) diff --git a/build.gradle b/build.gradle index 41764da9f..e5f8dd3bd 100644 --- a/build.gradle +++ b/build.gradle @@ -13,35 +13,30 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' -version = '0.0.4' -group = 'com.simibubi.create' // http://maven.apache.org/guides/mini/guide-naming-conventions.html +version = '0.0.5' +group = 'com.simibubi.create' archivesBaseName = 'create' -sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. +sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' minecraft { - // The mappings can be changed at any time, and must be in the following format. - // snapshot_YYYYMMDD Snapshot are built nightly. - // stable_# Stables are built at the discretion of the MCP team. - // Use non-default mappings at your own risk. they may not always work. - // Simply re-run your setup task after changing the mappings to update your workspace. - mappings channel: 'snapshot', version: '20190725-1.14.3' - // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. + mappings channel: 'snapshot', version: '20190806-1.14.3' - // accessTransformer = file('build/resources/main/META-INF/accesstransformer.cfg') - - // Default run configurations. - // These can be tweaked, removed, or duplicated as needed. runs { - client { + createDev { workingDirectory project.file('run') - - // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' - - // Recommended logging level for the console property 'forge.logging.console.level', 'debug' - + mods { + create { + source sourceSets.main + } + } + } + + createSimi { + workingDirectory project.file('run') + property 'forge.logging.console.level', 'info' mods { create { source sourceSets.main @@ -49,15 +44,9 @@ minecraft { } } - server { + createServer { workingDirectory project.file('run') - - // Recommended logging data for a userdev environment - property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' - - // Recommended logging level for the console - property 'forge.logging.console.level', 'debug' - + property 'forge.logging.console.level', 'info' mods { create { source sourceSets.main @@ -65,17 +54,11 @@ minecraft { } } - data { + createData { workingDirectory project.file('run') - - // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' - - // Recommended logging level for the console property 'forge.logging.console.level', 'debug' - args '--mod', 'create', '--all', '--output', file('src/generated/resources/') - mods { create { source sourceSets.main @@ -86,32 +69,9 @@ minecraft { } dependencies { - // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed - // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. - // The userdev artifact is a special name and will get all sorts of transformations applied to it. - minecraft 'net.minecraftforge:forge:1.14.4-28.0.14' - - // You may put jars on which you depend on in ./libs or you may define them like so.. - // compile "some.group:artifact:version:classifier" - // compile "some.group:artifact:version" - - // Real examples - // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env - // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env - - // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. - // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' - - // These dependencies get remapped to your current MCP mappings - // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev' - - // For more info... - // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html - // http://www.gradle.org/docs/current/userguide/dependency_management.html - + minecraft 'net.minecraftforge:forge:1.14.4-28.0.45' } -// Example for how to get properties into the manifest for reading by the runtime.. jar { manifest { attributes([ diff --git a/src/main/java/com/simibubi/create/AdvancementListener.java b/src/main/java/com/simibubi/create/AdvancementListener.java index 050449124..d71bcf4ca 100644 --- a/src/main/java/com/simibubi/create/AdvancementListener.java +++ b/src/main/java/com/simibubi/create/AdvancementListener.java @@ -12,7 +12,7 @@ public class AdvancementListener { @SubscribeEvent public static void onAdvancementGet(AdvancementEvent event) { - PlayerEntity player = event.getEntityPlayer(); + PlayerEntity player = event.getPlayer(); if (player == null) return; if (player.getServer() == null) @@ -36,9 +36,9 @@ public class AdvancementListener { } private static void unlockWhen(String advancement, ResourceLocation recipe, AdvancementEvent event) { - AdvancementManager advancements = event.getEntityPlayer().getServer().getAdvancementManager(); + AdvancementManager advancements = event.getPlayer().getServer().getAdvancementManager(); if (event.getAdvancement() == advancements.getAdvancement(new ResourceLocation(advancement))) - event.getEntityPlayer().unlockRecipes(new ResourceLocation[] { recipe }); + event.getPlayer().unlockRecipes(new ResourceLocation[] { recipe }); } private static ResourceLocation recipeOf(AllItems item) { diff --git a/src/main/java/com/simibubi/create/AllContainers.java b/src/main/java/com/simibubi/create/AllContainers.java index ef2d23cd2..6c78fc068 100644 --- a/src/main/java/com/simibubi/create/AllContainers.java +++ b/src/main/java/com/simibubi/create/AllContainers.java @@ -25,7 +25,9 @@ import net.minecraftforge.fml.network.IContainerFactory; public enum AllContainers { SchematicTable(SchematicTableContainer::new), - Schematicannon(SchematicannonContainer::new); + Schematicannon(SchematicannonContainer::new), + + ; public ContainerType type; private IFactory factory; diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index 3abc61bb0..5cfc0cbc5 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -39,7 +39,9 @@ public enum AllItems { TREE_FERTILIZER(new TreeFertilizerItem(standardProperties())), EMPTY_BLUEPRINT(new Item(standardProperties().maxStackSize(1))), BLUEPRINT_AND_QUILL(new BlueprintAndQuillItem(standardProperties().maxStackSize(1))), - BLUEPRINT(new BlueprintItem(standardProperties())); + BLUEPRINT(new BlueprintItem(standardProperties())), + + ; public Item item; diff --git a/src/main/java/com/simibubi/create/AllRecipes.java b/src/main/java/com/simibubi/create/AllRecipes.java index 7f025be89..53b26148c 100644 --- a/src/main/java/com/simibubi/create/AllRecipes.java +++ b/src/main/java/com/simibubi/create/AllRecipes.java @@ -10,7 +10,9 @@ import net.minecraftforge.event.RegistryEvent; public enum AllRecipes { - Placement_Handgun_Upgrade(BuilderGunUpgradeRecipe.Serializer::new); + Placement_Handgun_Upgrade(BuilderGunUpgradeRecipe.Serializer::new), + + ; public IRecipeSerializer serializer; public Supplier> supplier; diff --git a/src/main/java/com/simibubi/create/AllSpecialTextures.java b/src/main/java/com/simibubi/create/AllSpecialTextures.java index e843f97bb..07ec79251 100644 --- a/src/main/java/com/simibubi/create/AllSpecialTextures.java +++ b/src/main/java/com/simibubi/create/AllSpecialTextures.java @@ -5,7 +5,9 @@ import net.minecraft.util.ResourceLocation; public enum AllSpecialTextures { - Selection("selection.png"); + Selection("selection.png"), + + ; public static final String ASSET_PATH = "textures/special/"; private ResourceLocation location; diff --git a/src/main/java/com/simibubi/create/Create.java b/src/main/java/com/simibubi/create/Create.java index 1d01d9aea..fc4b52825 100644 --- a/src/main/java/com/simibubi/create/Create.java +++ b/src/main/java/com/simibubi/create/Create.java @@ -17,6 +17,9 @@ import net.minecraft.item.crafting.IRecipeSerializer; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.event.TickEvent.ClientTickEvent; +import net.minecraftforge.event.TickEvent.Phase; +import net.minecraftforge.event.TickEvent.ServerTickEvent; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.DistExecutor; @@ -24,8 +27,6 @@ import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; -import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent.ServerTickEvent; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.event.server.FMLServerStoppingEvent; @@ -37,7 +38,7 @@ public class Create { public static final String ID = "create"; public static final String NAME = "Create"; - public static final String VERSION = "0.0.4"; + public static final String VERSION = "0.0.5"; public static Logger logger = LogManager.getLogger(); @@ -76,6 +77,8 @@ public class Create { @SubscribeEvent public static void onTick(ServerTickEvent event) { + if (event.phase == Phase.START) + return; sSchematicLoader.tick(); } @@ -87,6 +90,11 @@ public class Create { @OnlyIn(Dist.CLIENT) @SubscribeEvent public static void onClientTick(ClientTickEvent event) { + if (event.phase == Phase.START) + return; + if (cSchematicLoader == null) + return; + cSchematicLoader.tick(); } diff --git a/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java b/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java index bfb3b8e63..25acabc6b 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java +++ b/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java @@ -4,9 +4,9 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screen.Screen; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.event.TickEvent.ClientTickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; -import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent; @OnlyIn(Dist.CLIENT) @EventBusSubscriber(value = Dist.CLIENT) diff --git a/src/main/java/com/simibubi/create/foundation/utility/FilesHelper.java b/src/main/java/com/simibubi/create/foundation/utility/FilesHelper.java index 61dca9899..7bcd04bbc 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/FilesHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/FilesHelper.java @@ -44,7 +44,7 @@ public class FilesHelper { } public static String slug(String name) { - return name.toLowerCase().replace(' ', '_'); + return name.toLowerCase().replace(' ', '_').replace('!', '_').replace('?', '_'); } public static boolean saveTagCompoundAsJson(CompoundNBT compound, String path) { diff --git a/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunHandler.java b/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunHandler.java index 330768892..4b7f94089 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunHandler.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunHandler.java @@ -35,11 +35,12 @@ import net.minecraft.util.math.Vec3d; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.event.RenderSpecificHandEvent; import net.minecraftforge.client.event.RenderWorldLastEvent; +import net.minecraftforge.event.TickEvent.ClientTickEvent; +import net.minecraftforge.event.TickEvent.Phase; import net.minecraftforge.event.world.BlockEvent.BreakEvent; import net.minecraftforge.eventbus.api.EventPriority; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; -import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent; @SuppressWarnings("deprecation") @EventBusSubscriber(value = Dist.CLIENT) @@ -108,6 +109,8 @@ public class BuilderGunHandler { @SubscribeEvent public static void onClientTick(ClientTickEvent event) { + if (event.phase == Phase.START) + return; if (cachedBeams == null) cachedBeams = new LinkedList<>(); ClientWorld world = Minecraft.getInstance().world; diff --git a/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunUpgradeRecipe.java b/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunUpgradeRecipe.java index 4e04036bd..d3362030f 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunUpgradeRecipe.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunUpgradeRecipe.java @@ -102,4 +102,9 @@ public class BuilderGunUpgradeRecipe implements ICraftingRecipe { } + @Override + public boolean canFit(int width, int height) { + return recipe.canFit(width, height); + } + } diff --git a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonScreen.java b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonScreen.java index 07d35d60f..0be76418a 100644 --- a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonScreen.java +++ b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonScreen.java @@ -102,7 +102,8 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen -#updateJSONURL=""#optional -# A URL for the "homepage" for this mod, displayed in the mod UI -# A file name (in the root of the mod JAR) containing a logo for display -# A text field displayed in the mod UI -authors="simibubi" #optional -# The description text for the mod (multi line!) (#mandatory) +modLoader="javafml" +loaderVersion="[28,)" +#issueTrackerURL="" + +[[mods]] +modId="create" +version="0.0.4" +displayName="Create" +#updateJSONURL="" +authors="simibubi" description=''' A handful of additions to aid the creative survivalist.''' -# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. -[[dependencies.examplemod]] #optional - # the modid of the dependency - modId="forge" #mandatory - # Does this dependency have to exist - if not, ordering below must be specified - mandatory=true #mandatory - # The version range of the dependency - versionRange="[27,)" #mandatory - # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory + +[[dependencies.create]] + modId="forge" + mandatory=true + versionRange="[28.0.45,)" ordering="NONE" - # Side this dependency is applied on - BOTH, CLIENT or SERVER side="BOTH" -# Here's another dependency -[[dependencies.examplemod]] + +[[dependencies.create]] modId="minecraft" mandatory=true - versionRange="[1.14.3]" + versionRange="[1.14.4]" ordering="NONE" side="BOTH" \ No newline at end of file From 8c7ba5f0240f79bc9bf31f75a8fa88697c11ccca Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Tue, 6 Aug 2019 19:25:06 +0200 Subject: [PATCH 2/3] Mod Compatible slot input checks - Input slots of the schematicannon validates items using more generic checks, Fixes #4 --- .../modules/schematics/block/SchematicannonTileEntity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonTileEntity.java b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonTileEntity.java index a97e6ade9..db88fb3e3 100644 --- a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonTileEntity.java @@ -125,11 +125,12 @@ public class SchematicannonTileEntity extends SyncedTileEntity implements ITicka case 1: // Blueprint output return false; case 2: // Book input - return stack.getItem() == Items.BOOK || stack.getItem() == Items.WRITTEN_BOOK; + return stack.isItemEqual(new ItemStack(Items.BOOK)) + || stack.isItemEqual(new ItemStack(Items.WRITTEN_BOOK)); case 3: // Material List output return false; case 4: // Gunpowder - return stack.getItem() == Items.GUNPOWDER; + return stack.isItemEqual(new ItemStack(Items.GUNPOWDER)); default: return super.isItemValid(slot, stack); } From 5e9950ba98695bd7b2a5db0d68cb11f4486771e7 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Tue, 6 Aug 2019 21:51:02 +0200 Subject: [PATCH 3/3] Last Minute changes 0.0.5 - Fixed inconsistent version - Added control tooltip for scroll inputs - Particles of symmetrically broken blocks appear at the correct location - Fixed crash in schematictable when refreshing an emptied folder --- build.gradle | 23 +++++-------------- .../gui/widgets/SelectionScrollInput.java | 1 + .../placementHandgun/BuilderGunHandler.java | 2 +- .../block/SchematicTableScreen.java | 15 ++++++++---- .../modules/symmetry/SymmetryWandItem.java | 2 +- src/main/resources/META-INF/mods.toml | 2 +- 6 files changed, 21 insertions(+), 24 deletions(-) diff --git a/build.gradle b/build.gradle index e5f8dd3bd..486d4a485 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' -version = '0.0.5' +version = 'mc1.14.4_v0.0.5' group = 'com.simibubi.create' archivesBaseName = 'create' @@ -22,19 +22,8 @@ sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = co minecraft { mappings channel: 'snapshot', version: '20190806-1.14.3' - runs { - createDev { - workingDirectory project.file('run') - property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' - property 'forge.logging.console.level', 'debug' - mods { - create { - source sourceSets.main - } - } - } - - createSimi { + runs { + client { workingDirectory project.file('run') property 'forge.logging.console.level', 'info' mods { @@ -44,7 +33,7 @@ minecraft { } } - createServer { + server { workingDirectory project.file('run') property 'forge.logging.console.level', 'info' mods { @@ -54,7 +43,7 @@ minecraft { } } - createData { + data { workingDirectory project.file('run') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' @@ -77,7 +66,7 @@ jar { attributes([ "Specification-Title": "create", "Specification-Vendor": "simibubi", - "Specification-Version": "1", // We are version 1 of ourselves + "Specification-Version": "1", "Implementation-Title": project.name, "Implementation-Version": "${version}", "Implementation-Vendor" :"simibubi", diff --git a/src/main/java/com/simibubi/create/foundation/gui/widgets/SelectionScrollInput.java b/src/main/java/com/simibubi/create/foundation/gui/widgets/SelectionScrollInput.java index 5efc0787d..0c5fded72 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/widgets/SelectionScrollInput.java +++ b/src/main/java/com/simibubi/create/foundation/gui/widgets/SelectionScrollInput.java @@ -42,6 +42,7 @@ public class SelectionScrollInput extends ScrollInput { result.append(TextFormatting.GRAY).append("> ").append(options.get(i)); toolTip.add(result.toString()); } + toolTip.add(TextFormatting.DARK_GRAY + "" + TextFormatting.ITALIC + "Scroll to Select"); } } diff --git a/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunHandler.java b/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunHandler.java index 4b7f94089..7edfdbd06 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunHandler.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunHandler.java @@ -120,7 +120,7 @@ public class BuilderGunHandler { if (player == null) return; cachedBeams.removeIf(b -> b.itensity < .1f); - cachedBeams.forEach(b -> b.itensity *= .7f); + cachedBeams.forEach(b -> b.itensity *= .4f); lastLeftHandAnimation = leftHandAnimation; lastRightHandAnimation = rightHandAnimation; diff --git a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableScreen.java b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableScreen.java index d68e40301..7cc1578b2 100644 --- a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableScreen.java +++ b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableScreen.java @@ -52,8 +52,9 @@ public class SchematicTableScreen extends AbstractSimiContainerScreen availableSchematics = Create.cSchematicLoader.getAvailableSchematics(); + schematicsLabel = new Label(mainLeft + 36, mainTop + 26, "").withShadow(); + schematicsLabel.text = ""; if (!availableSchematics.isEmpty()) { - schematicsLabel = new Label(mainLeft + 36, mainTop + 26, "").withShadow(); schematicsArea = new SelectionScrollInput(mainLeft + 33, mainTop + 23, 134, 14).forOptions(availableSchematics) .titled("Available Schematics").writingTo(schematicsLabel); widgets.add(schematicsArea); @@ -186,9 +187,15 @@ public class SchematicTableScreen extends AbstractSimiContainerScreen availableSchematics = Create.cSchematicLoader.getAvailableSchematics(); widgets.remove(schematicsArea); - schematicsArea = new SelectionScrollInput(guiLeft - 56 + 33, guiTop - 16 + 23, 134, 14).forOptions(availableSchematics) - .titled("Available Schematics").writingTo(schematicsLabel); - widgets.add(schematicsArea); + + if (!availableSchematics.isEmpty()) { + schematicsArea = new SelectionScrollInput(guiLeft - 56 + 33, guiTop - 16 + 23, 134, 14).forOptions(availableSchematics) + .titled("Available Schematics").writingTo(schematicsLabel); + widgets.add(schematicsArea); + } else { + schematicsArea = null; + schematicsLabel.text = ""; + } } return super.mouseClicked(p_mouseClicked_1_, p_mouseClicked_3_, p_mouseClicked_5_); diff --git a/src/main/java/com/simibubi/create/modules/symmetry/SymmetryWandItem.java b/src/main/java/com/simibubi/create/modules/symmetry/SymmetryWandItem.java index f2b534884..996f1abbf 100644 --- a/src/main/java/com/simibubi/create/modules/symmetry/SymmetryWandItem.java +++ b/src/main/java/com/simibubi/create/modules/symmetry/SymmetryWandItem.java @@ -267,7 +267,7 @@ public class SymmetryWandItem extends Item { continue; } else { targets.add(position); - world.playEvent(2001, pos, Block.getStateId(blockstate)); + world.playEvent(2001, position, Block.getStateId(blockstate)); world.setBlockState(position, air, 3); if (!player.isCreative()) { diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 57effd04a..34dcf7b82 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -4,7 +4,7 @@ loaderVersion="[28,)" [[mods]] modId="create" -version="0.0.4" +version="0.0.5" displayName="Create" #updateJSONURL="" authors="simibubi"