From 1851c925605df93481dde774b8393ef732c48e9b Mon Sep 17 00:00:00 2001 From: Doenerstyle <103001779+Doenerstyle@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:23:56 +0100 Subject: [PATCH 01/11] Updated build.gradle (fixed building) * Upgraded to anatawa12's fork of ForgeGradle 2.3. * Updated Minecraft mappings to stable_39 * Added CraftTweaker dependency --- build.gradle | 69 +++++++++++++++++----------------------------------- 1 file changed, 22 insertions(+), 47 deletions(-) diff --git a/build.gradle b/build.gradle index e53412ad..884b7345 100644 --- a/build.gradle +++ b/build.gradle @@ -1,36 +1,24 @@ buildscript { repositories { - jcenter() + mavenCentral() + //jcenter() maven { name = "forge" - url = "http://files.minecraftforge.net/maven" - } - maven { - name = "sonatype" - url = "https://oss.sonatype.org/content/repositories/snapshots/" - } - maven { - name = "gradle" - url "https://plugins.gradle.org/m2/" - } - maven { - name = "CurseForge" - url = "https://minecraft.curseforge.com/api/maven/" + url = "https://maven.minecraftforge.net" } } - dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' - classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7' + classpath("com.anatawa12.forge:ForgeGradle:2.3-1.0.+") { + changing = true + } } } repositories { - mavenLocal() - maven { + /*maven { name 'DVS1 Maven FS' url 'http://dvs1.progwml6.com/files/maven' - } + }*/ maven { // CraftTweaker name 'jared maven' url "http://maven.blamejared.com/" @@ -39,16 +27,16 @@ repositories { name 'tterrag maven' url "http://maven.tterrag.com/" } - maven { // compatlayer + /*maven { // compatlayer name 'K-4u maven' url "http://maven.k-4u.nl/" - } + }*/ maven { url = "https://minecraft.curseforge.com/api/maven/" } - maven { + /*maven { name 'forge' - url 'http://files.minecraftforge.net/maven' + url 'https://maven.minecraftforge.net' } maven { name = "CoFH Maven" @@ -61,7 +49,7 @@ repositories { maven { name "IC2 Forestry" url "http://maven.ic2.player.to/" - } + }*/ maven { // location of the maven that hosts JEI files name = "Progwml6 maven" @@ -73,20 +61,12 @@ repositories { url = "modmaven.k-4u.nl" } maven { - name = "hwyla" - url "https://maven.tehnut.info" + name = "CurseMaven" + url = "https://cursemaven.com" } } apply plugin: 'net.minecraftforge.gradle.forge' -apply plugin: 'org.sonarqube' - -sonarqube { - properties { - property "sonar.projectName" , "Growthcraft-1.12" - property "sonar.projectKey", "growthcraft:Growthcraft-1.12" - } -} ext.configFile = file "gradle.properties" configFile.withReader { @@ -123,15 +103,12 @@ def getArtifactVersion() { } else { "SNAPSHOT-" + revision } - } version = project.property('minecraft_version') + "-" + project.property('mod_version') + "-" + getArtifactVersion() group = "growthcraft" archivesBaseName = "growthcraft" - - extractAnnotationsJar.doFirst { sourceSets.main.output.resourcesDir.listFiles().each { System.out.println('Resources: ' + it.absolutePath) @@ -141,15 +118,15 @@ extractAnnotationsJar.doFirst { } } -sourceCompatibility = targetCompatibility = '1.8' +sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 compileJava { - sourceCompatibility = targetCompatibility = '1.8' + sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 } minecraft { version = "1.12.2-14.23.5.2847" runDir = "run" - mappings = "snapshot_20171003" + mappings = "stable_39" //makeObfSourceJar = false } @@ -162,10 +139,11 @@ dependencies { deobfProvided "mezz.jei:jei_" + project.property('minecraft_version') + ":" + project.property('jei_version') + ":api" - compile "rustic:Rustic:" + project.property('rustic_version') + compile "curse.maven:rustic-256141:3107974" compile "thaumcraft:Thaumcraft:" + project.property('minecraft_version') + ":" + project.property('thaumcraft_version') - compile "mcp.mobius.waila:Hwyla:" + project.property('hwyla_version') - compile "baubles:Baubles:" + project.property('minecraft_version_short') + ":" + project.property('baubles_version') + compile "curse.maven:hwyla-253449:2568751" + compile "curse.maven:baubles-227083:2518667" + compile "curse.maven:crafttweaker-239197:5013567" runtime "mezz.jei:jei_" + project.property('minecraft_version') + ":" + project.property('jei_version') } @@ -177,6 +155,3 @@ processResources { } sourceSets { sourceSets -> main } - - - From 4811854d7a9f1febf047353429408384a99278eb Mon Sep 17 00:00:00 2001 From: Doenerstyle <103001779+Doenerstyle@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:37:18 +0100 Subject: [PATCH 02/11] Fixed compilation errors --- .../apples/common/block/BlockApple.java | 4 +-- .../apples/common/block/BlockAppleDoor.java | 2 +- .../apples/common/block/BlockAppleFence.java | 2 +- .../common/block/BlockAppleFenceGate.java | 4 +-- .../apples/common/block/BlockApplePlanks.java | 2 +- .../apples/common/block/BlockAppleSlab.java | 6 ++-- .../apples/common/block/BlockAppleStairs.java | 2 +- .../apples/common/item/ItemAppleDoor.java | 2 +- .../apples/common/item/ItemAppleLeaves.java | 4 +-- .../apples/common/item/ItemAppleSapling.java | 2 +- .../bamboo/common/block/BlockBambooDoor.java | 2 +- .../bamboo/common/block/BlockBambooFence.java | 2 +- .../common/block/BlockBambooFenceGate.java | 4 +-- .../common/block/BlockBambooLeaves.java | 6 ++-- .../bamboo/common/block/BlockBambooPlank.java | 2 +- .../bamboo/common/block/BlockBambooShoot.java | 2 +- .../bamboo/common/block/BlockBambooSlab.java | 6 ++-- .../common/block/BlockBambooStairs.java | 2 +- .../bamboo/common/block/BlockBambooStalk.java | 2 +- .../bamboo/common/item/ItemBambooCoal.java | 2 +- .../bamboo/common/item/ItemBambooDoor.java | 2 +- .../bamboo/common/item/ItemBambooStick.java | 2 +- .../bees/common/block/BlockBeeBox.java | 2 +- .../bees/common/block/BlockBeeHive.java | 2 +- .../bees/common/items/ItemBeesWax.java | 8 ++--- .../bees/common/items/ItemHoneyJar.java | 2 +- .../shared/init/GrowthcraftBeesItems.java | 30 ++++++++--------- .../cellar/common/block/BlockBrewKettle.java | 4 +-- .../cellar/common/block/BlockCultureJar.java | 4 +-- .../common/block/BlockFermentBarrel.java | 2 +- .../cellar/common/block/BlockFruitPress.java | 2 +- .../common/block/BlockFruitPresser.java | 2 +- .../cellar/common/item/ItemBarrelTap.java | 2 +- .../cellar/common/item/ItemBrewKettleLid.java | 2 +- .../cellar/common/item/ItemChievDummy.java | 2 +- .../cellar/common/item/ItemCorkBark.java | 2 +- .../cellar/common/item/ItemYeast.java | 6 ++-- .../cellar/shared/item/ItemBoozeBottle.java | 4 +-- .../user/UserHeatSourcesConfig.java | 2 +- .../core/common/block/BlockRopeFence.java | 4 +-- .../core/common/block/BlockRopeKnot.java | 2 +- .../core/common/block/BlockSalt.java | 2 +- .../core/common/block/BlockSaltOre.java | 2 +- .../common/creativetabs/TabGrowthcraft.java | 2 +- .../core/common/item/ItemCrowbar.java | 8 ++--- .../core/common/item/ItemRope.java | 2 +- .../core/common/item/ItemSalt.java | 2 +- .../core/shared/block/BlockPaddyBase.java | 2 +- .../shared/block/GrowthcraftBlockFluid.java | 6 ++-- .../shared/block/GrowthcraftBlockLeaves.java | 6 ++-- .../shared/block/GrowthcraftBlockLog.java | 2 +- .../shared/block/GrowthcraftBlockSapling.java | 2 +- .../GrowthcraftRotatableBlockContainer.java | 2 +- .../shared/config/schema/BlockKeySchema.java | 4 +-- .../shared/config/schema/ItemStackSchema.java | 4 +-- .../definition/BlockTypeDefinition.java | 4 +-- .../definition/FluidTypeDefinition.java | 2 +- .../shared/definition/ItemTypeDefinition.java | 8 ++--- .../shared/init/GrowthcraftCoreItems.java | 32 +++++++++---------- .../core/shared/io/nbt/NBTHelper.java | 2 +- .../core/shared/item/GrowthcraftItemBase.java | 2 +- .../shared/legacy/FluidContainerRegistry.java | 2 +- .../core/shared/utils/LootUtils.java | 4 +-- .../fishtrap/common/block/BlockFishtrap.java | 2 +- .../common/tileentity/TileEntityFishtrap.java | 2 +- .../grapes/common/blocks/BlockGrapeFruit.java | 2 +- .../common/blocks/BlockGrapeLeaves.java | 6 ++-- .../grapes/common/items/ItemGrape.java | 8 ++--- .../grapes/common/items/ItemGrapeSeed.java | 8 ++--- .../shared/init/GrowthcraftGrapesItems.java | 6 ++-- .../hops/common/block/BlockHops.java | 2 +- .../hops/common/item/ItemHops.java | 2 +- .../hops/common/item/ItemSeedHops.java | 2 +- .../milk/common/block/BlockButterChurn.java | 2 +- .../common/block/BlockButterChurnPlunger.java | 2 +- .../milk/common/block/BlockCheesePress.java | 2 +- .../milk/common/block/BlockCheeseVat.java | 2 +- .../milk/common/block/BlockHangingCurds.java | 2 +- .../milk/common/block/BlockPancheon.java | 2 +- .../milk/common/block/BlockThistle.java | 4 +-- .../milk/common/item/ItemAgedCheeseSlice.java | 8 ++--- .../common/item/ItemBlockCheeseBlock.java | 6 ++-- .../common/item/ItemBlockHangingCurds.java | 6 ++-- .../milk/common/item/ItemButter.java | 8 ++--- .../milk/common/item/ItemCheeseCloth.java | 2 +- .../milk/common/item/ItemIceCream.java | 8 ++--- .../milk/common/item/ItemKnife.java | 2 +- .../milk/common/item/ItemSeedThistle.java | 2 +- .../common/item/ItemSimpleCheeseSlice.java | 8 ++--- .../milk/common/item/ItemStarterCulture.java | 2 +- .../milk/common/item/ItemStomach.java | 2 +- .../milk/common/item/ItemThistle.java | 2 +- .../common/item/ItemWaxedCheeseSlice.java | 8 ++--- .../milk/common/item/ItemYogurt.java | 8 ++--- .../milk/shared/cheese/CheeseIO.java | 4 +-- .../shared/init/GrowthcraftMilkItems.java | 6 ++-- .../rice/common/block/BlockPaddy.java | 4 +-- .../rice/common/block/BlockRiceCrop.java | 2 +- .../rice/common/item/ItemCultivator.java | 2 +- .../rice/common/item/ItemFoodRice.java | 2 +- .../rice/common/item/ItemRice.java | 2 +- .../rice/common/item/ItemRiceBall.java | 2 +- 102 files changed, 201 insertions(+), 201 deletions(-) diff --git a/src/main/java/growthcraft/apples/common/block/BlockApple.java b/src/main/java/growthcraft/apples/common/block/BlockApple.java index 0e49150b..d4c8258e 100644 --- a/src/main/java/growthcraft/apples/common/block/BlockApple.java +++ b/src/main/java/growthcraft/apples/common/block/BlockApple.java @@ -56,7 +56,7 @@ public class BlockApple extends BlockBush implements ICropDataProvider, IGrowabl public BlockApple(String unlocalizedName) { super(Material.PLANTS); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setTickRandomly(true); this.setSoundType(SoundType.WOOD); @@ -83,7 +83,7 @@ public IBlockState getStateFromMeta(int meta) { @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, @Nullable World player, List tooltip, ITooltipFlag advanced) { super.addInformation(stack, player, tooltip, advanced); - tooltip.add(TextFormatting.BLUE + I18n.format(this.getUnlocalizedName() + ".tooltip")); + tooltip.add(TextFormatting.BLUE + I18n.format(this.getTranslationKey() + ".tooltip")); } @Override diff --git a/src/main/java/growthcraft/apples/common/block/BlockAppleDoor.java b/src/main/java/growthcraft/apples/common/block/BlockAppleDoor.java index 2a88e80e..5a6c1da1 100644 --- a/src/main/java/growthcraft/apples/common/block/BlockAppleDoor.java +++ b/src/main/java/growthcraft/apples/common/block/BlockAppleDoor.java @@ -18,7 +18,7 @@ public class BlockAppleDoor extends BlockDoor { public BlockAppleDoor(String unlocalizedName) { super(Material.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setSoundType(SoundType.WOOD); this.disableStats(); diff --git a/src/main/java/growthcraft/apples/common/block/BlockAppleFence.java b/src/main/java/growthcraft/apples/common/block/BlockAppleFence.java index a5fec4a6..ca502b78 100644 --- a/src/main/java/growthcraft/apples/common/block/BlockAppleFence.java +++ b/src/main/java/growthcraft/apples/common/block/BlockAppleFence.java @@ -10,7 +10,7 @@ public class BlockAppleFence extends BlockFence { public BlockAppleFence(String unlocalizedName) { super(Material.WOOD, MapColor.RED); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHardness(2.0F); this.setHarvestLevel("axe", 1); diff --git a/src/main/java/growthcraft/apples/common/block/BlockAppleFenceGate.java b/src/main/java/growthcraft/apples/common/block/BlockAppleFenceGate.java index 9347efad..533097b6 100644 --- a/src/main/java/growthcraft/apples/common/block/BlockAppleFenceGate.java +++ b/src/main/java/growthcraft/apples/common/block/BlockAppleFenceGate.java @@ -36,7 +36,7 @@ public class BlockAppleFenceGate extends BlockHorizontal { public BlockAppleFenceGate(String unlocalizedName) { super(Material.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHardness(2.0F); this.setHarvestLevel("axe", 1); @@ -184,7 +184,7 @@ public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAc @SuppressWarnings("deprecation") @Override public IBlockState getStateFromMeta(int meta) { - return this.getDefaultState().withProperty(FACING, EnumFacing.getHorizontal(meta)).withProperty(OPEN, Boolean.valueOf((meta & 4) != 0)).withProperty(POWERED, Boolean.valueOf((meta & 8) != 0)); + return this.getDefaultState().withProperty(FACING, EnumFacing.byHorizontalIndex(meta)).withProperty(OPEN, Boolean.valueOf((meta & 4) != 0)).withProperty(POWERED, Boolean.valueOf((meta & 8) != 0)); } /** diff --git a/src/main/java/growthcraft/apples/common/block/BlockApplePlanks.java b/src/main/java/growthcraft/apples/common/block/BlockApplePlanks.java index 10ea97f4..bb74d129 100644 --- a/src/main/java/growthcraft/apples/common/block/BlockApplePlanks.java +++ b/src/main/java/growthcraft/apples/common/block/BlockApplePlanks.java @@ -14,7 +14,7 @@ public class BlockApplePlanks extends Block { public BlockApplePlanks(String unlocalizedName) { super(Material.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setResistance(5.0F); this.setHardness(2.0F); diff --git a/src/main/java/growthcraft/apples/common/block/BlockAppleSlab.java b/src/main/java/growthcraft/apples/common/block/BlockAppleSlab.java index 01425556..af87b8f8 100644 --- a/src/main/java/growthcraft/apples/common/block/BlockAppleSlab.java +++ b/src/main/java/growthcraft/apples/common/block/BlockAppleSlab.java @@ -20,7 +20,7 @@ public abstract class BlockAppleSlab extends BlockSlab { public BlockAppleSlab(String unlocalizedName) { super(Material.WOOD, MapColor.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setSoundType(SoundType.WOOD); this.setResistance(5.0F); @@ -38,8 +38,8 @@ public BlockAppleSlab(String unlocalizedName) { } @Override - public String getUnlocalizedName(int meta) { - return this.getUnlocalizedName(); + public String getTranslationKey(int meta) { + return this.getTranslationKey(); } @Override diff --git a/src/main/java/growthcraft/apples/common/block/BlockAppleStairs.java b/src/main/java/growthcraft/apples/common/block/BlockAppleStairs.java index a18e70c1..6de16d36 100644 --- a/src/main/java/growthcraft/apples/common/block/BlockAppleStairs.java +++ b/src/main/java/growthcraft/apples/common/block/BlockAppleStairs.java @@ -11,7 +11,7 @@ public class BlockAppleStairs extends BlockStairs { public BlockAppleStairs(String unlocalizedName, IBlockState state) { super(state); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setResistance(5.0F); this.setHardness(2.0F); diff --git a/src/main/java/growthcraft/apples/common/item/ItemAppleDoor.java b/src/main/java/growthcraft/apples/common/item/ItemAppleDoor.java index 71c82e2c..0000ba2b 100644 --- a/src/main/java/growthcraft/apples/common/item/ItemAppleDoor.java +++ b/src/main/java/growthcraft/apples/common/item/ItemAppleDoor.java @@ -8,7 +8,7 @@ public class ItemAppleDoor extends ItemDoor { public ItemAppleDoor(String unlocalizedName, Block block) { super(block); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } } diff --git a/src/main/java/growthcraft/apples/common/item/ItemAppleLeaves.java b/src/main/java/growthcraft/apples/common/item/ItemAppleLeaves.java index b808f71a..2c38ca91 100644 --- a/src/main/java/growthcraft/apples/common/item/ItemAppleLeaves.java +++ b/src/main/java/growthcraft/apples/common/item/ItemAppleLeaves.java @@ -27,7 +27,7 @@ public int getMetadata(int damage) { * different names based on their damage or NBT. */ @Override - public String getUnlocalizedName(ItemStack stack) { - return leaves.getUnlocalizedName(); + public String getTranslationKey(ItemStack stack) { + return leaves.getTranslationKey(); } } diff --git a/src/main/java/growthcraft/apples/common/item/ItemAppleSapling.java b/src/main/java/growthcraft/apples/common/item/ItemAppleSapling.java index ce100346..3ecd2884 100644 --- a/src/main/java/growthcraft/apples/common/item/ItemAppleSapling.java +++ b/src/main/java/growthcraft/apples/common/item/ItemAppleSapling.java @@ -7,7 +7,7 @@ public class ItemAppleSapling extends Item { public ItemAppleSapling(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } } diff --git a/src/main/java/growthcraft/bamboo/common/block/BlockBambooDoor.java b/src/main/java/growthcraft/bamboo/common/block/BlockBambooDoor.java index 53b95da5..7119a1ef 100644 --- a/src/main/java/growthcraft/bamboo/common/block/BlockBambooDoor.java +++ b/src/main/java/growthcraft/bamboo/common/block/BlockBambooDoor.java @@ -18,7 +18,7 @@ public class BlockBambooDoor extends BlockDoor { public BlockBambooDoor(String unlocalizedName) { super(Material.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setSoundType(SoundType.WOOD); this.disableStats(); diff --git a/src/main/java/growthcraft/bamboo/common/block/BlockBambooFence.java b/src/main/java/growthcraft/bamboo/common/block/BlockBambooFence.java index 9274b552..0a6d900e 100644 --- a/src/main/java/growthcraft/bamboo/common/block/BlockBambooFence.java +++ b/src/main/java/growthcraft/bamboo/common/block/BlockBambooFence.java @@ -10,7 +10,7 @@ public class BlockBambooFence extends BlockFence { public BlockBambooFence(String unlocalizedName) { super(Material.WOOD, MapColor.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHardness(2.0F); this.setHarvestLevel("axe", 1); diff --git a/src/main/java/growthcraft/bamboo/common/block/BlockBambooFenceGate.java b/src/main/java/growthcraft/bamboo/common/block/BlockBambooFenceGate.java index a40e9a10..9f357d3a 100644 --- a/src/main/java/growthcraft/bamboo/common/block/BlockBambooFenceGate.java +++ b/src/main/java/growthcraft/bamboo/common/block/BlockBambooFenceGate.java @@ -37,7 +37,7 @@ public class BlockBambooFenceGate extends BlockHorizontal { public BlockBambooFenceGate(String unlocalizedName) { super(Material.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHardness(2.0F); this.setHarvestLevel("axe", 1); @@ -170,7 +170,7 @@ public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAc */ @SuppressWarnings("deprecation") public IBlockState getStateFromMeta(int meta) { - return this.getDefaultState().withProperty(FACING, EnumFacing.getHorizontal(meta)).withProperty(OPEN, Boolean.valueOf((meta & 4) != 0)).withProperty(POWERED, Boolean.valueOf((meta & 8) != 0)); + return this.getDefaultState().withProperty(FACING, EnumFacing.byHorizontalIndex(meta)).withProperty(OPEN, Boolean.valueOf((meta & 4) != 0)).withProperty(POWERED, Boolean.valueOf((meta & 8) != 0)); } /** diff --git a/src/main/java/growthcraft/bamboo/common/block/BlockBambooLeaves.java b/src/main/java/growthcraft/bamboo/common/block/BlockBambooLeaves.java index 4ac2abdc..1658465d 100644 --- a/src/main/java/growthcraft/bamboo/common/block/BlockBambooLeaves.java +++ b/src/main/java/growthcraft/bamboo/common/block/BlockBambooLeaves.java @@ -25,7 +25,7 @@ public class BlockBambooLeaves extends BlockLeaves implements IShearable { public BlockBambooLeaves(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setLightOpacity(1); this.setSoundType(SoundType.PLANT); @@ -82,8 +82,8 @@ public boolean isFullCube(IBlockState state) { } @Override - public BlockRenderLayer getBlockLayer() { - return BlockRenderLayer.CUTOUT_MIPPED; + public BlockRenderLayer getRenderLayer() { + return Blocks.LEAVES.getRenderLayer(); } @Override diff --git a/src/main/java/growthcraft/bamboo/common/block/BlockBambooPlank.java b/src/main/java/growthcraft/bamboo/common/block/BlockBambooPlank.java index 039ace55..7a7a9d94 100644 --- a/src/main/java/growthcraft/bamboo/common/block/BlockBambooPlank.java +++ b/src/main/java/growthcraft/bamboo/common/block/BlockBambooPlank.java @@ -14,7 +14,7 @@ public class BlockBambooPlank extends Block { public BlockBambooPlank() { super(Material.WOOD); - this.setUnlocalizedName("bamboo_plank"); + this.setTranslationKey("bamboo_plank"); this.setRegistryName(new ResourceLocation(Reference.MODID, "bamboo_plank")); this.setResistance(5.0F); this.setHardness(2.0F); diff --git a/src/main/java/growthcraft/bamboo/common/block/BlockBambooShoot.java b/src/main/java/growthcraft/bamboo/common/block/BlockBambooShoot.java index d02ed5e8..43efb875 100644 --- a/src/main/java/growthcraft/bamboo/common/block/BlockBambooShoot.java +++ b/src/main/java/growthcraft/bamboo/common/block/BlockBambooShoot.java @@ -28,7 +28,7 @@ public class BlockBambooShoot extends BlockBush implements IGrowable { ); public BlockBambooShoot(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setSoundType(SoundType.PLANT); } diff --git a/src/main/java/growthcraft/bamboo/common/block/BlockBambooSlab.java b/src/main/java/growthcraft/bamboo/common/block/BlockBambooSlab.java index c6ae08f4..f2a45c68 100644 --- a/src/main/java/growthcraft/bamboo/common/block/BlockBambooSlab.java +++ b/src/main/java/growthcraft/bamboo/common/block/BlockBambooSlab.java @@ -20,7 +20,7 @@ public abstract class BlockBambooSlab extends BlockSlab { public BlockBambooSlab(String unlocalizedName) { super(Material.WOOD, MapColor.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setSoundType(SoundType.WOOD); this.setResistance(5.0F); @@ -38,8 +38,8 @@ public BlockBambooSlab(String unlocalizedName) { } @Override - public String getUnlocalizedName(int meta) { - return this.getUnlocalizedName(); + public String getTranslationKey(int meta) { + return this.getTranslationKey(); } @Override diff --git a/src/main/java/growthcraft/bamboo/common/block/BlockBambooStairs.java b/src/main/java/growthcraft/bamboo/common/block/BlockBambooStairs.java index 0fc6dc56..e801e78f 100644 --- a/src/main/java/growthcraft/bamboo/common/block/BlockBambooStairs.java +++ b/src/main/java/growthcraft/bamboo/common/block/BlockBambooStairs.java @@ -10,7 +10,7 @@ public class BlockBambooStairs extends BlockStairs { public BlockBambooStairs(String unlocalizedName, IBlockState state) { super(state); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setResistance(5.0F); this.setHardness(2.0F); diff --git a/src/main/java/growthcraft/bamboo/common/block/BlockBambooStalk.java b/src/main/java/growthcraft/bamboo/common/block/BlockBambooStalk.java index ff4be311..0f1a52ba 100644 --- a/src/main/java/growthcraft/bamboo/common/block/BlockBambooStalk.java +++ b/src/main/java/growthcraft/bamboo/common/block/BlockBambooStalk.java @@ -28,7 +28,7 @@ public class BlockBambooStalk extends Block { public BlockBambooStalk(String unlocalizedName) { super(Material.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setResistance(5.0F); this.setHardness(2.0F); diff --git a/src/main/java/growthcraft/bamboo/common/item/ItemBambooCoal.java b/src/main/java/growthcraft/bamboo/common/item/ItemBambooCoal.java index cd0f5bb9..80f4cf9b 100644 --- a/src/main/java/growthcraft/bamboo/common/item/ItemBambooCoal.java +++ b/src/main/java/growthcraft/bamboo/common/item/ItemBambooCoal.java @@ -7,7 +7,7 @@ public class ItemBambooCoal extends Item { public ItemBambooCoal(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } } diff --git a/src/main/java/growthcraft/bamboo/common/item/ItemBambooDoor.java b/src/main/java/growthcraft/bamboo/common/item/ItemBambooDoor.java index 2be75e29..bad03ad1 100644 --- a/src/main/java/growthcraft/bamboo/common/item/ItemBambooDoor.java +++ b/src/main/java/growthcraft/bamboo/common/item/ItemBambooDoor.java @@ -8,7 +8,7 @@ public class ItemBambooDoor extends ItemDoor { public ItemBambooDoor(String unlocalizedName, Block block) { super(block); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } } diff --git a/src/main/java/growthcraft/bamboo/common/item/ItemBambooStick.java b/src/main/java/growthcraft/bamboo/common/item/ItemBambooStick.java index a85df795..1193a93c 100644 --- a/src/main/java/growthcraft/bamboo/common/item/ItemBambooStick.java +++ b/src/main/java/growthcraft/bamboo/common/item/ItemBambooStick.java @@ -7,7 +7,7 @@ public class ItemBambooStick extends Item { public ItemBambooStick(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } diff --git a/src/main/java/growthcraft/bees/common/block/BlockBeeBox.java b/src/main/java/growthcraft/bees/common/block/BlockBeeBox.java index 4e9ebf93..ec71b105 100644 --- a/src/main/java/growthcraft/bees/common/block/BlockBeeBox.java +++ b/src/main/java/growthcraft/bees/common/block/BlockBeeBox.java @@ -42,7 +42,7 @@ public BlockBeeBox(String unlocalizedName) { setHardness(2.5F); setSoundType(SoundType.WOOD); this.setTickRandomly(true); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } diff --git a/src/main/java/growthcraft/bees/common/block/BlockBeeHive.java b/src/main/java/growthcraft/bees/common/block/BlockBeeHive.java index bfc7200e..f6726f21 100644 --- a/src/main/java/growthcraft/bees/common/block/BlockBeeHive.java +++ b/src/main/java/growthcraft/bees/common/block/BlockBeeHive.java @@ -34,7 +34,7 @@ public class BlockBeeHive extends GrowthcraftRotatableBlockContainer { public BlockBeeHive(String unlocalizedName) { super(Material.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHarvestLevel("axe", 1); this.setTickRandomly(true); diff --git a/src/main/java/growthcraft/bees/common/items/ItemBeesWax.java b/src/main/java/growthcraft/bees/common/items/ItemBeesWax.java index 330d9eec..90cfeae2 100644 --- a/src/main/java/growthcraft/bees/common/items/ItemBeesWax.java +++ b/src/main/java/growthcraft/bees/common/items/ItemBeesWax.java @@ -10,7 +10,7 @@ public class ItemBeesWax extends GrowthcraftItemBase { public ItemBeesWax(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(Reference.MODID, unlocalizedName); this.setHasSubtypes(true); } @@ -25,14 +25,14 @@ public void getSubItems(CreativeTabs tab, NonNullList subItems) { } @Override - public String getUnlocalizedName(ItemStack stack) { + public String getTranslationKey(ItemStack stack) { for (int i = 0; i < BeesWaxTypes.values().length; i++) { if (stack.getItemDamage() == i) { - return this.getUnlocalizedName() + "." + BeesWaxTypes.values()[i].getName(); + return this.getTranslationKey() + "." + BeesWaxTypes.values()[i].getName(); } else { continue; } } - return super.getUnlocalizedName() + "." + BeesWaxTypes.NORMAL.getName(); + return super.getTranslationKey() + "." + BeesWaxTypes.NORMAL.getName(); } } \ No newline at end of file diff --git a/src/main/java/growthcraft/bees/common/items/ItemHoneyJar.java b/src/main/java/growthcraft/bees/common/items/ItemHoneyJar.java index 3e794ba2..091ec43d 100644 --- a/src/main/java/growthcraft/bees/common/items/ItemHoneyJar.java +++ b/src/main/java/growthcraft/bees/common/items/ItemHoneyJar.java @@ -10,7 +10,7 @@ public ItemHoneyJar(String unlocalizedName) { super(6, false); this.setContainerItem(Items.FLOWER_POT); this.setMaxStackSize(1); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(Reference.MODID, unlocalizedName); } } \ No newline at end of file diff --git a/src/main/java/growthcraft/bees/shared/init/GrowthcraftBeesItems.java b/src/main/java/growthcraft/bees/shared/init/GrowthcraftBeesItems.java index 407f2766..44f59479 100644 --- a/src/main/java/growthcraft/bees/shared/init/GrowthcraftBeesItems.java +++ b/src/main/java/growthcraft/bees/shared/init/GrowthcraftBeesItems.java @@ -27,22 +27,22 @@ private GrowthcraftBeesItems() { public static ItemTypeDefinition honeyMeadBottle; public enum BeesWaxTypes implements IStringSerializable, IItemStackFactory, IObjectVariant { - WHITE(EnumDyeColor.WHITE.getMetadata(), EnumDyeColor.WHITE.getUnlocalizedName()), - ORANGE(EnumDyeColor.ORANGE.getMetadata(), EnumDyeColor.ORANGE.getUnlocalizedName()), - MAGENTA(EnumDyeColor.MAGENTA.getMetadata(), EnumDyeColor.MAGENTA.getUnlocalizedName()), - LIGHTBLUE(EnumDyeColor.LIGHT_BLUE.getMetadata(), EnumDyeColor.LIGHT_BLUE.getUnlocalizedName()), + WHITE(EnumDyeColor.WHITE.getMetadata(), EnumDyeColor.WHITE.getTranslationKey()), + ORANGE(EnumDyeColor.ORANGE.getMetadata(), EnumDyeColor.ORANGE.getTranslationKey()), + MAGENTA(EnumDyeColor.MAGENTA.getMetadata(), EnumDyeColor.MAGENTA.getTranslationKey()), + LIGHTBLUE(EnumDyeColor.LIGHT_BLUE.getMetadata(), EnumDyeColor.LIGHT_BLUE.getTranslationKey()), NORMAL(EnumDyeColor.YELLOW.getMetadata(), "normal"), - LIME(EnumDyeColor.LIME.getMetadata(), EnumDyeColor.LIME.getUnlocalizedName()), - PINK(EnumDyeColor.PINK.getMetadata(), EnumDyeColor.PINK.getUnlocalizedName()), - GRAY(EnumDyeColor.GRAY.getMetadata(), EnumDyeColor.GRAY.getUnlocalizedName()), - SILVER(EnumDyeColor.SILVER.getMetadata(), EnumDyeColor.SILVER.getUnlocalizedName()), - CYAN(EnumDyeColor.CYAN.getMetadata(), EnumDyeColor.CYAN.getUnlocalizedName()), - PURPLE(EnumDyeColor.PURPLE.getMetadata(), EnumDyeColor.PURPLE.getUnlocalizedName()), - BLUE(EnumDyeColor.BLUE.getMetadata(), EnumDyeColor.BLUE.getUnlocalizedName()), - BROWN(EnumDyeColor.BROWN.getMetadata(), EnumDyeColor.BROWN.getUnlocalizedName()), - GREEN(EnumDyeColor.GREEN.getMetadata(), EnumDyeColor.GREEN.getUnlocalizedName()), - RED(EnumDyeColor.RED.getMetadata(), EnumDyeColor.RED.getUnlocalizedName()), - BLACK(EnumDyeColor.BLACK.getMetadata(), EnumDyeColor.BLACK.getUnlocalizedName()); + LIME(EnumDyeColor.LIME.getMetadata(), EnumDyeColor.LIME.getTranslationKey()), + PINK(EnumDyeColor.PINK.getMetadata(), EnumDyeColor.PINK.getTranslationKey()), + GRAY(EnumDyeColor.GRAY.getMetadata(), EnumDyeColor.GRAY.getTranslationKey()), + SILVER(EnumDyeColor.SILVER.getMetadata(), EnumDyeColor.SILVER.getTranslationKey()), + CYAN(EnumDyeColor.CYAN.getMetadata(), EnumDyeColor.CYAN.getTranslationKey()), + PURPLE(EnumDyeColor.PURPLE.getMetadata(), EnumDyeColor.PURPLE.getTranslationKey()), + BLUE(EnumDyeColor.BLUE.getMetadata(), EnumDyeColor.BLUE.getTranslationKey()), + BROWN(EnumDyeColor.BROWN.getMetadata(), EnumDyeColor.BROWN.getTranslationKey()), + GREEN(EnumDyeColor.GREEN.getMetadata(), EnumDyeColor.GREEN.getTranslationKey()), + RED(EnumDyeColor.RED.getMetadata(), EnumDyeColor.RED.getTranslationKey()), + BLACK(EnumDyeColor.BLACK.getMetadata(), EnumDyeColor.BLACK.getTranslationKey()); private int ID; private String NAME; diff --git a/src/main/java/growthcraft/cellar/common/block/BlockBrewKettle.java b/src/main/java/growthcraft/cellar/common/block/BlockBrewKettle.java index 147de60f..39804a2d 100644 --- a/src/main/java/growthcraft/cellar/common/block/BlockBrewKettle.java +++ b/src/main/java/growthcraft/cellar/common/block/BlockBrewKettle.java @@ -68,7 +68,7 @@ public BlockBrewKettle(String unlocalizedName) { setSoundType(SoundType.METAL); setTileEntityType(TileEntityBrewKettle.class); this.setHardness(2.0F); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setDefaultState(this.getBlockState().getBaseState().withProperty(TYPE_LID, false)); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } @@ -85,7 +85,7 @@ public void fillWithRain(World world, BlockPos pos) { } @Override - public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) { + public void onEntityCollision(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) { if (!worldIn.isRemote) { final TileEntityBrewKettle te = getTileEntity(worldIn, pos); if (te != null && !te.hasLid()) { diff --git a/src/main/java/growthcraft/cellar/common/block/BlockCultureJar.java b/src/main/java/growthcraft/cellar/common/block/BlockCultureJar.java index 8ca15f8e..8b90de3e 100644 --- a/src/main/java/growthcraft/cellar/common/block/BlockCultureJar.java +++ b/src/main/java/growthcraft/cellar/common/block/BlockCultureJar.java @@ -26,7 +26,7 @@ public class BlockCultureJar extends BlockCellarContainer { public BlockCultureJar(String unlocalizedName) { super(Material.GLASS); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHardness(0.3F); this.setSoundType(SoundType.GLASS); @@ -63,7 +63,7 @@ public boolean isFullCube(IBlockState state) { } @Override - public BlockRenderLayer getBlockLayer() { + public BlockRenderLayer getRenderLayer() { return BlockRenderLayer.TRANSLUCENT; } diff --git a/src/main/java/growthcraft/cellar/common/block/BlockFermentBarrel.java b/src/main/java/growthcraft/cellar/common/block/BlockFermentBarrel.java index 16645c3e..84dad5b3 100644 --- a/src/main/java/growthcraft/cellar/common/block/BlockFermentBarrel.java +++ b/src/main/java/growthcraft/cellar/common/block/BlockFermentBarrel.java @@ -35,7 +35,7 @@ public BlockFermentBarrel(String unlocalizedName) { setHardness(2.5F); setSoundType(SoundType.WOOD); this.setDefaultState(this.getBlockState().getBaseState().withProperty(TYPE_TAP, false).withProperty(TYPE_BARREL_ROTATION, BarrelRotation.HOR_NORTH)); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } diff --git a/src/main/java/growthcraft/cellar/common/block/BlockFruitPress.java b/src/main/java/growthcraft/cellar/common/block/BlockFruitPress.java index 8a7f32da..d0932d40 100644 --- a/src/main/java/growthcraft/cellar/common/block/BlockFruitPress.java +++ b/src/main/java/growthcraft/cellar/common/block/BlockFruitPress.java @@ -31,7 +31,7 @@ public BlockFruitPress(String unlocalizedName) { setHardness(2.0F); this.setResistance(5.0F); setSoundType(SoundType.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } diff --git a/src/main/java/growthcraft/cellar/common/block/BlockFruitPresser.java b/src/main/java/growthcraft/cellar/common/block/BlockFruitPresser.java index d986931e..6978d279 100644 --- a/src/main/java/growthcraft/cellar/common/block/BlockFruitPresser.java +++ b/src/main/java/growthcraft/cellar/common/block/BlockFruitPresser.java @@ -47,7 +47,7 @@ public BlockFruitPresser(String unlocalizedName) { setHardness(2.0F); this.setResistance(5.0F); setSoundType(SoundType.STONE); // Formerly soundTypePiston - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHarvestLevel("axe", 0); } diff --git a/src/main/java/growthcraft/cellar/common/item/ItemBarrelTap.java b/src/main/java/growthcraft/cellar/common/item/ItemBarrelTap.java index 705060e5..1cf5fe21 100644 --- a/src/main/java/growthcraft/cellar/common/item/ItemBarrelTap.java +++ b/src/main/java/growthcraft/cellar/common/item/ItemBarrelTap.java @@ -8,7 +8,7 @@ public class ItemBarrelTap extends GrowthcraftItemBase { public ItemBarrelTap(String unlocalizedName) { super(); setMaxDamage(0); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } } diff --git a/src/main/java/growthcraft/cellar/common/item/ItemBrewKettleLid.java b/src/main/java/growthcraft/cellar/common/item/ItemBrewKettleLid.java index 21ea9353..81accb39 100644 --- a/src/main/java/growthcraft/cellar/common/item/ItemBrewKettleLid.java +++ b/src/main/java/growthcraft/cellar/common/item/ItemBrewKettleLid.java @@ -8,7 +8,7 @@ public class ItemBrewKettleLid extends GrowthcraftItemBase { public ItemBrewKettleLid(String unlocalizedName) { super(); setMaxDamage(0); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } } diff --git a/src/main/java/growthcraft/cellar/common/item/ItemChievDummy.java b/src/main/java/growthcraft/cellar/common/item/ItemChievDummy.java index 0879b25e..14eb1aa4 100644 --- a/src/main/java/growthcraft/cellar/common/item/ItemChievDummy.java +++ b/src/main/java/growthcraft/cellar/common/item/ItemChievDummy.java @@ -12,7 +12,7 @@ public ItemChievDummy(String unlocalizedName) { this.setMaxDamage(0); // this.setCreativeTab(tabGrowthcraft); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } } diff --git a/src/main/java/growthcraft/cellar/common/item/ItemCorkBark.java b/src/main/java/growthcraft/cellar/common/item/ItemCorkBark.java index 6adb7f4b..3363ec37 100644 --- a/src/main/java/growthcraft/cellar/common/item/ItemCorkBark.java +++ b/src/main/java/growthcraft/cellar/common/item/ItemCorkBark.java @@ -8,7 +8,7 @@ public class ItemCorkBark extends GrowthcraftItemBase { public ItemCorkBark(String unlocalizedName) { super(); setMaxDamage(0); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } } diff --git a/src/main/java/growthcraft/cellar/common/item/ItemYeast.java b/src/main/java/growthcraft/cellar/common/item/ItemYeast.java index d0a2a5f6..33a8f050 100644 --- a/src/main/java/growthcraft/cellar/common/item/ItemYeast.java +++ b/src/main/java/growthcraft/cellar/common/item/ItemYeast.java @@ -15,13 +15,13 @@ public ItemYeast(String unlocalizedName) { super(); setHasSubtypes(true); setMaxDamage(0); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } @Override - public String getUnlocalizedName(ItemStack stack) { - return super.getUnlocalizedName(stack) + "." + EnumYeast.getSafeByMeta(stack.getItemDamage()).toString().toLowerCase(); + public String getTranslationKey(ItemStack stack) { + return super.getTranslationKey(stack) + "." + EnumYeast.getSafeByMeta(stack.getItemDamage()).toString().toLowerCase(); } @Override diff --git a/src/main/java/growthcraft/cellar/shared/item/ItemBoozeBottle.java b/src/main/java/growthcraft/cellar/shared/item/ItemBoozeBottle.java index 359ea253..6fe776a5 100644 --- a/src/main/java/growthcraft/cellar/shared/item/ItemBoozeBottle.java +++ b/src/main/java/growthcraft/cellar/shared/item/ItemBoozeBottle.java @@ -138,9 +138,9 @@ public boolean hasEffect(ItemStack stack) { } @Override - public String getUnlocalizedName(ItemStack stack) { + public String getTranslationKey(ItemStack stack) { Booze booze = getFluid(stack); - return super.getUnlocalizedName() + "_" + booze.getName().substring(12); // skipping "fluid_booze_" part + return super.getTranslationKey() + "_" + booze.getName().substring(12); // skipping "fluid_booze_" part } @Override diff --git a/src/main/java/growthcraft/cellar/shared/processing/heatsource/user/UserHeatSourcesConfig.java b/src/main/java/growthcraft/cellar/shared/processing/heatsource/user/UserHeatSourcesConfig.java index 4c19270e..22fee157 100644 --- a/src/main/java/growthcraft/cellar/shared/processing/heatsource/user/UserHeatSourcesConfig.java +++ b/src/main/java/growthcraft/cellar/shared/processing/heatsource/user/UserHeatSourcesConfig.java @@ -26,7 +26,7 @@ public UserHeatSourceEntry addDefault(String m, String b, Map s) } public UserHeatSourceEntry addDefault(ResourceLocation registryName, Map s) { - return addDefault(registryName.getResourceDomain(), registryName.getResourcePath(), s); + return addDefault(registryName.getNamespace(), registryName.getPath(), s); } @Override diff --git a/src/main/java/growthcraft/core/common/block/BlockRopeFence.java b/src/main/java/growthcraft/core/common/block/BlockRopeFence.java index 73f9cc0d..f5f7208f 100644 --- a/src/main/java/growthcraft/core/common/block/BlockRopeFence.java +++ b/src/main/java/growthcraft/core/common/block/BlockRopeFence.java @@ -41,7 +41,7 @@ public class BlockRopeFence extends BlockRopeBase { public BlockRopeFence(String unlocalizedName) { super(Material.CARPET); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHardness(0.5F); this.setSoundType(SoundType.CLOTH); @@ -78,7 +78,7 @@ public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { } @Override - public void onBlockDestroyedByPlayer(World worldIn, BlockPos pos, IBlockState state) { + public void onPlayerDestroy(World worldIn, BlockPos pos, IBlockState state) { // Always return a rope when broken if (!worldIn.isRemote) { ItemStack rope = GrowthcraftCoreItems.rope.asStack(1); diff --git a/src/main/java/growthcraft/core/common/block/BlockRopeKnot.java b/src/main/java/growthcraft/core/common/block/BlockRopeKnot.java index 82fba093..3b06c91c 100644 --- a/src/main/java/growthcraft/core/common/block/BlockRopeKnot.java +++ b/src/main/java/growthcraft/core/common/block/BlockRopeKnot.java @@ -76,7 +76,7 @@ public BlockRopeKnot(String unlocalizedName, Block baseFence) { public BlockRopeKnot(String unlocalizedName, Block baseFence, String modid) { super(Material.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(modid, unlocalizedName)); this.setHardness(3); diff --git a/src/main/java/growthcraft/core/common/block/BlockSalt.java b/src/main/java/growthcraft/core/common/block/BlockSalt.java index 70e0d614..15e7c74e 100644 --- a/src/main/java/growthcraft/core/common/block/BlockSalt.java +++ b/src/main/java/growthcraft/core/common/block/BlockSalt.java @@ -16,7 +16,7 @@ public class BlockSalt extends Block { public BlockSalt(String unlocalizedName) { super(Material.CLAY); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHardness(0.5F); this.setSoundType(SoundType.STONE); diff --git a/src/main/java/growthcraft/core/common/block/BlockSaltOre.java b/src/main/java/growthcraft/core/common/block/BlockSaltOre.java index 96869e39..7300f74e 100644 --- a/src/main/java/growthcraft/core/common/block/BlockSaltOre.java +++ b/src/main/java/growthcraft/core/common/block/BlockSaltOre.java @@ -16,7 +16,7 @@ public class BlockSaltOre extends BlockOre { public BlockSaltOre(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHardness(3.0F); this.setResistance(5.0F); diff --git a/src/main/java/growthcraft/core/common/creativetabs/TabGrowthcraft.java b/src/main/java/growthcraft/core/common/creativetabs/TabGrowthcraft.java index f0857416..6eb2f803 100644 --- a/src/main/java/growthcraft/core/common/creativetabs/TabGrowthcraft.java +++ b/src/main/java/growthcraft/core/common/creativetabs/TabGrowthcraft.java @@ -11,7 +11,7 @@ public TabGrowthcraft() { } @Override - public ItemStack getTabIconItem() { + public ItemStack createIcon() { return GrowthcraftCoreItems.crowbar.asStack(); } } diff --git a/src/main/java/growthcraft/core/common/item/ItemCrowbar.java b/src/main/java/growthcraft/core/common/item/ItemCrowbar.java index 3b18a54a..c2c71db5 100644 --- a/src/main/java/growthcraft/core/common/item/ItemCrowbar.java +++ b/src/main/java/growthcraft/core/common/item/ItemCrowbar.java @@ -10,7 +10,7 @@ public class ItemCrowbar extends Item { public ItemCrowbar(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(Reference.MODID, unlocalizedName); this.setHasSubtypes(true); } @@ -25,14 +25,14 @@ public void getSubItems(CreativeTabs tab, NonNullList subItems) { } @Override - public String getUnlocalizedName(ItemStack stack) { + public String getTranslationKey(ItemStack stack) { for (int i = 0; i < CrowbarTypes.values().length; i++) { if (stack.getItemDamage() == i) { - return this.getUnlocalizedName() + "." + CrowbarTypes.values()[i].getName(); + return this.getTranslationKey() + "." + CrowbarTypes.values()[i].getName(); } else { continue; } } - return super.getUnlocalizedName() + "." + CrowbarTypes.SILVER.getName(); + return super.getTranslationKey() + "." + CrowbarTypes.SILVER.getName(); } } diff --git a/src/main/java/growthcraft/core/common/item/ItemRope.java b/src/main/java/growthcraft/core/common/item/ItemRope.java index f2f4d5a1..c66304d8 100644 --- a/src/main/java/growthcraft/core/common/item/ItemRope.java +++ b/src/main/java/growthcraft/core/common/item/ItemRope.java @@ -16,7 +16,7 @@ public class ItemRope extends Item { public ItemRope(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } diff --git a/src/main/java/growthcraft/core/common/item/ItemSalt.java b/src/main/java/growthcraft/core/common/item/ItemSalt.java index 92ac5ade..45bd4066 100644 --- a/src/main/java/growthcraft/core/common/item/ItemSalt.java +++ b/src/main/java/growthcraft/core/common/item/ItemSalt.java @@ -6,7 +6,7 @@ public class ItemSalt extends Item { public ItemSalt(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(Reference.MODID, unlocalizedName); } diff --git a/src/main/java/growthcraft/core/shared/block/BlockPaddyBase.java b/src/main/java/growthcraft/core/shared/block/BlockPaddyBase.java index eb7fac9a..9937bd68 100644 --- a/src/main/java/growthcraft/core/shared/block/BlockPaddyBase.java +++ b/src/main/java/growthcraft/core/shared/block/BlockPaddyBase.java @@ -70,7 +70,7 @@ public boolean isFullCube(IBlockState state) { } @Override - public BlockRenderLayer getBlockLayer() { + public BlockRenderLayer getRenderLayer() { return BlockRenderLayer.TRANSLUCENT; } diff --git a/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockFluid.java b/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockFluid.java index 56bd107f..fb93805e 100644 --- a/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockFluid.java +++ b/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockFluid.java @@ -14,17 +14,17 @@ public class GrowthcraftBlockFluid extends BlockFluidClassic { public GrowthcraftBlockFluid(Fluid fluid, Material material) { super(fluid, material); - this.setUnlocalizedName(fluid.getUnlocalizedName()); + this.setTranslationKey(fluid.getUnlocalizedName()); } @Nonnull @Override - public String getUnlocalizedName() { + public String getTranslationKey() { Fluid fluid = FluidRegistry.getFluid(fluidName); if (fluid != null) { return fluid.getUnlocalizedName(); } - return super.getUnlocalizedName(); + return super.getTranslationKey(); } public GrowthcraftBlockFluid refreshColor() { diff --git a/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockLeaves.java b/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockLeaves.java index 670896f5..7c6875ea 100644 --- a/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockLeaves.java +++ b/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockLeaves.java @@ -34,7 +34,7 @@ public class GrowthcraftBlockLeaves extends BlockLeaves implements IShearable { private BlockDefinition blockSapling; public GrowthcraftBlockLeaves(String modid, String unlocalizedName, BlockDefinition block) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(modid, unlocalizedName)); this.setCreativeTab(null); // Will be initialized in Init class this.setDefaultState(this.blockState.getBaseState().withProperty(CHECK_DECAY, Boolean.valueOf(true)).withProperty(DECAYABLE, Boolean.valueOf(true))); @@ -44,8 +44,8 @@ public GrowthcraftBlockLeaves(String modid, String unlocalizedName, BlockDefinit @Override @SideOnly(Side.CLIENT) - public BlockRenderLayer getBlockLayer() { - return Blocks.LEAVES.getBlockLayer(); + public BlockRenderLayer getRenderLayer() { + return Blocks.LEAVES.getRenderLayer(); } @Override diff --git a/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockLog.java b/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockLog.java index ce7ef349..f01233fe 100644 --- a/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockLog.java +++ b/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockLog.java @@ -15,7 +15,7 @@ public class GrowthcraftBlockLog extends BlockLog { public GrowthcraftBlockLog(String modid, String unlocalizedName) { super(); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(modid, unlocalizedName)); this.setHardness(2.0F); this.setSoundType(SoundType.WOOD); diff --git a/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockSapling.java b/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockSapling.java index f7cca901..55c09359 100644 --- a/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockSapling.java +++ b/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockSapling.java @@ -27,7 +27,7 @@ public class GrowthcraftBlockSapling extends BlockBush implements IGrowable { public GrowthcraftBlockSapling(String modid, String unlocalizedName) { super(Material.PLANTS); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(modid, unlocalizedName)); this.setSoundType(SoundType.PLANT); } diff --git a/src/main/java/growthcraft/core/shared/block/GrowthcraftRotatableBlockContainer.java b/src/main/java/growthcraft/core/shared/block/GrowthcraftRotatableBlockContainer.java index 3008de06..e9f9f6fa 100644 --- a/src/main/java/growthcraft/core/shared/block/GrowthcraftRotatableBlockContainer.java +++ b/src/main/java/growthcraft/core/shared/block/GrowthcraftRotatableBlockContainer.java @@ -122,7 +122,7 @@ protected BlockStateContainer createBlockState() { @Nonnull @Override public IBlockState getStateFromMeta(int meta) { - return this.getDefaultState().withProperty(TYPE_ROTATION, EnumFacing.getFront(meta)); + return this.getDefaultState().withProperty(TYPE_ROTATION, EnumFacing.byIndex(meta)); } @Override diff --git a/src/main/java/growthcraft/core/shared/config/schema/BlockKeySchema.java b/src/main/java/growthcraft/core/shared/config/schema/BlockKeySchema.java index db49d047..94a9a024 100644 --- a/src/main/java/growthcraft/core/shared/config/schema/BlockKeySchema.java +++ b/src/main/java/growthcraft/core/shared/config/schema/BlockKeySchema.java @@ -21,8 +21,8 @@ public BlockKeySchema(Block block, int pmeta) { // final ResourceLocation resloc = new ResourceLocation(block.getUnlocalizedName()); // final UniqueIdentifier uuid = GameRegistry.findUniqueIdentifierFor(block); final ResourceLocation resloc = block.getRegistryName(); - this.mod_id = resloc.getResourceDomain(); //uuid.modId; - this.name = resloc.getResourcePath(); // uuid.name; + this.mod_id = resloc.getNamespace(); //uuid.modId; + this.name = resloc.getPath(); // uuid.name; this.meta = pmeta; this.comment = block.getLocalizedName(); } diff --git a/src/main/java/growthcraft/core/shared/config/schema/ItemStackSchema.java b/src/main/java/growthcraft/core/shared/config/schema/ItemStackSchema.java index b9d7871e..f9bdd9a9 100644 --- a/src/main/java/growthcraft/core/shared/config/schema/ItemStackSchema.java +++ b/src/main/java/growthcraft/core/shared/config/schema/ItemStackSchema.java @@ -32,8 +32,8 @@ public ItemStackSchema(@Nonnull String mid, @Nonnull String nm, int amt, int mt) public ItemStackSchema(@Nonnull ItemStack stack) { final ResourceLocation resloc = stack.getItem().getRegistryName(); // final UniqueIdentifier uuid = GameRegistry.findUniqueIdentifierFor(stack.getItem()); - this.mod_id = resloc.getResourceDomain(); // uuid.modId; - this.name = resloc.getResourcePath(); // uuid.name; + this.mod_id = resloc.getNamespace(); // uuid.modId; + this.name = resloc.getPath(); // uuid.name; this.amount = stack.getCount(); this.meta = stack.getItemDamage(); this.comment = stack.getDisplayName(); diff --git a/src/main/java/growthcraft/core/shared/definition/BlockTypeDefinition.java b/src/main/java/growthcraft/core/shared/definition/BlockTypeDefinition.java index b083e47c..87767567 100644 --- a/src/main/java/growthcraft/core/shared/definition/BlockTypeDefinition.java +++ b/src/main/java/growthcraft/core/shared/definition/BlockTypeDefinition.java @@ -119,7 +119,7 @@ public void registerBlockItem(IForgeRegistry registry) { * @param itemBlock - item class to register to */ public void registerBlock(IForgeRegistry registry, ResourceLocation name) { - getBlock().setUnlocalizedName(name.getResourcePath()); + getBlock().setTranslationKey(name.getPath()); getBlock().setRegistryName(name); registerBlock(registry); @@ -145,7 +145,7 @@ public void registerItemRender() { @SideOnly(Side.CLIENT) public void registerItemRender(int meta, String fileName) { - String modID = getBlock().getRegistryName().getResourceDomain(); + String modID = getBlock().getRegistryName().getNamespace(); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(getBlock()), meta, new ModelResourceLocation(new ResourceLocation(modID, fileName), "inventory")); diff --git a/src/main/java/growthcraft/core/shared/definition/FluidTypeDefinition.java b/src/main/java/growthcraft/core/shared/definition/FluidTypeDefinition.java index a8771f26..063d5c8b 100644 --- a/src/main/java/growthcraft/core/shared/definition/FluidTypeDefinition.java +++ b/src/main/java/growthcraft/core/shared/definition/FluidTypeDefinition.java @@ -54,7 +54,7 @@ public void registerRenderer() { Item item = Item.getItemFromBlock(fluid.getBlock()); // subString 6 because "fluid." is 6. - String modID = fluid.getBlock().getRegistryName().getResourceDomain(); + String modID = fluid.getBlock().getRegistryName().getNamespace(); ModelResourceLocation modelResourceLocation = new ModelResourceLocation(modID + ":" + fluid.getUnlocalizedName().substring(6), fluid.getName()); // Set the custom mesh definition for the item using a lambda diff --git a/src/main/java/growthcraft/core/shared/definition/ItemTypeDefinition.java b/src/main/java/growthcraft/core/shared/definition/ItemTypeDefinition.java index 49ba5cf9..d3b8439b 100644 --- a/src/main/java/growthcraft/core/shared/definition/ItemTypeDefinition.java +++ b/src/main/java/growthcraft/core/shared/definition/ItemTypeDefinition.java @@ -38,7 +38,7 @@ public boolean equals(Item other) { * @param name - item name */ public void registerItem(IForgeRegistry registry, ResourceLocation name) { - getItem().setUnlocalizedName(name.getResourcePath()); + getItem().setTranslationKey(name.getPath()); getItem().setRegistryName(name); registerItem(registry); } @@ -55,7 +55,7 @@ public void registerRender() { @SideOnly(Side.CLIENT) public void registerRender(int meta, String fileName) { - String modID = getItem().getRegistryName().getResourceDomain(); + String modID = getItem().getRegistryName().getNamespace(); ModelLoader.setCustomModelResourceLocation(getItem(), meta, new ModelResourceLocation(new ResourceLocation(modID, fileName), "inventory")); @@ -73,7 +73,7 @@ public void registerRenders(ET ResourceLocation itemResloc = getItem().getRegistryName(); for (ET type : variants) { - registerRender(type.getVariantID(), itemResloc.getResourcePath() + "_" + type.getName()); + registerRender(type.getVariantID(), itemResloc.getPath() + "_" + type.getName()); } } @@ -91,7 +91,7 @@ public void registerModelBakeryVariants(ET... v for (int i = 0; i < reslocs.length; i++) { ET type = variants[i]; - reslocs[i] = new ResourceLocation(itemResloc.getResourceDomain(), itemResloc.getResourcePath() + "_" + type.getName()); + reslocs[i] = new ResourceLocation(itemResloc.getNamespace(), itemResloc.getPath() + "_" + type.getName()); } ModelBakery.registerItemVariants(getItem(), reslocs); diff --git a/src/main/java/growthcraft/core/shared/init/GrowthcraftCoreItems.java b/src/main/java/growthcraft/core/shared/init/GrowthcraftCoreItems.java index 276904e5..e07d9273 100644 --- a/src/main/java/growthcraft/core/shared/init/GrowthcraftCoreItems.java +++ b/src/main/java/growthcraft/core/shared/init/GrowthcraftCoreItems.java @@ -14,22 +14,22 @@ public class GrowthcraftCoreItems { public static ItemDefinition rope; public enum CrowbarTypes implements IStringSerializable, IItemStackFactory, IObjectVariant { - WHITE(EnumDyeColor.WHITE.getMetadata(), EnumDyeColor.WHITE.getUnlocalizedName()), - ORANGE(EnumDyeColor.ORANGE.getMetadata(), EnumDyeColor.ORANGE.getUnlocalizedName()), - MAGENTA(EnumDyeColor.MAGENTA.getMetadata(), EnumDyeColor.MAGENTA.getUnlocalizedName()), - LIGHTBLUE(EnumDyeColor.LIGHT_BLUE.getMetadata(), EnumDyeColor.LIGHT_BLUE.getUnlocalizedName()), - YELLOW(EnumDyeColor.YELLOW.getMetadata(), EnumDyeColor.YELLOW.getUnlocalizedName()), - LIME(EnumDyeColor.LIME.getMetadata(), EnumDyeColor.LIME.getUnlocalizedName()), - PINK(EnumDyeColor.PINK.getMetadata(), EnumDyeColor.PINK.getUnlocalizedName()), - GRAY(EnumDyeColor.GRAY.getMetadata(), EnumDyeColor.GRAY.getUnlocalizedName()), - SILVER(EnumDyeColor.SILVER.getMetadata(), EnumDyeColor.SILVER.getUnlocalizedName()), - CYAN(EnumDyeColor.CYAN.getMetadata(), EnumDyeColor.CYAN.getUnlocalizedName()), - PURPLE(EnumDyeColor.PURPLE.getMetadata(), EnumDyeColor.PURPLE.getUnlocalizedName()), - BLUE(EnumDyeColor.BLUE.getMetadata(), EnumDyeColor.BLUE.getUnlocalizedName()), - BROWN(EnumDyeColor.BROWN.getMetadata(), EnumDyeColor.BROWN.getUnlocalizedName()), - GREEN(EnumDyeColor.GREEN.getMetadata(), EnumDyeColor.GREEN.getUnlocalizedName()), - RED(EnumDyeColor.RED.getMetadata(), EnumDyeColor.RED.getUnlocalizedName()), - BLACK(EnumDyeColor.BLACK.getMetadata(), EnumDyeColor.BLACK.getUnlocalizedName()); + WHITE(EnumDyeColor.WHITE.getMetadata(), EnumDyeColor.WHITE.getTranslationKey()), + ORANGE(EnumDyeColor.ORANGE.getMetadata(), EnumDyeColor.ORANGE.getTranslationKey()), + MAGENTA(EnumDyeColor.MAGENTA.getMetadata(), EnumDyeColor.MAGENTA.getTranslationKey()), + LIGHTBLUE(EnumDyeColor.LIGHT_BLUE.getMetadata(), EnumDyeColor.LIGHT_BLUE.getTranslationKey()), + YELLOW(EnumDyeColor.YELLOW.getMetadata(), EnumDyeColor.YELLOW.getTranslationKey()), + LIME(EnumDyeColor.LIME.getMetadata(), EnumDyeColor.LIME.getTranslationKey()), + PINK(EnumDyeColor.PINK.getMetadata(), EnumDyeColor.PINK.getTranslationKey()), + GRAY(EnumDyeColor.GRAY.getMetadata(), EnumDyeColor.GRAY.getTranslationKey()), + SILVER(EnumDyeColor.SILVER.getMetadata(), EnumDyeColor.SILVER.getTranslationKey()), + CYAN(EnumDyeColor.CYAN.getMetadata(), EnumDyeColor.CYAN.getTranslationKey()), + PURPLE(EnumDyeColor.PURPLE.getMetadata(), EnumDyeColor.PURPLE.getTranslationKey()), + BLUE(EnumDyeColor.BLUE.getMetadata(), EnumDyeColor.BLUE.getTranslationKey()), + BROWN(EnumDyeColor.BROWN.getMetadata(), EnumDyeColor.BROWN.getTranslationKey()), + GREEN(EnumDyeColor.GREEN.getMetadata(), EnumDyeColor.GREEN.getTranslationKey()), + RED(EnumDyeColor.RED.getMetadata(), EnumDyeColor.RED.getTranslationKey()), + BLACK(EnumDyeColor.BLACK.getMetadata(), EnumDyeColor.BLACK.getTranslationKey()); private int ID; private String NAME; diff --git a/src/main/java/growthcraft/core/shared/io/nbt/NBTHelper.java b/src/main/java/growthcraft/core/shared/io/nbt/NBTHelper.java index 9ab9c66b..d003a334 100644 --- a/src/main/java/growthcraft/core/shared/io/nbt/NBTHelper.java +++ b/src/main/java/growthcraft/core/shared/io/nbt/NBTHelper.java @@ -38,7 +38,7 @@ public static int getInteger(@Nonnull NBTTagCompound tag, String name) { * @return null if the tag was null or empty, the tag otherwise */ public static NBTTagCompound compoundTagPresence(@Nullable NBTTagCompound tag) { - if (tag != null && !tag.hasNoTags()) { + if (tag != null && !tag.isEmpty()) { return tag; } return null; diff --git a/src/main/java/growthcraft/core/shared/item/GrowthcraftItemBase.java b/src/main/java/growthcraft/core/shared/item/GrowthcraftItemBase.java index 578c85e4..aff673c9 100644 --- a/src/main/java/growthcraft/core/shared/item/GrowthcraftItemBase.java +++ b/src/main/java/growthcraft/core/shared/item/GrowthcraftItemBase.java @@ -17,7 +17,7 @@ public GrowthcraftItemBase() { } public GrowthcraftItemBase(String modId, String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(modId, unlocalizedName); } diff --git a/src/main/java/growthcraft/core/shared/legacy/FluidContainerRegistry.java b/src/main/java/growthcraft/core/shared/legacy/FluidContainerRegistry.java index 88c5c6c8..9dcd194d 100644 --- a/src/main/java/growthcraft/core/shared/legacy/FluidContainerRegistry.java +++ b/src/main/java/growthcraft/core/shared/legacy/FluidContainerRegistry.java @@ -167,7 +167,7 @@ public static boolean registerFluidContainer(FluidContainerData data) { return false; } if (data.fluid == null || data.fluid.getFluid() == null) { - FMLLog.bigWarning("Invalid registration attempt for a fluid container item %s has occurred. The registration has been denied to prevent crashes. The mod responsible for the registration needs to correct this.", data.filledContainer.getItem().getUnlocalizedName(data.filledContainer)); + FMLLog.bigWarning("Invalid registration attempt for a fluid container item %s has occurred. The registration has been denied to prevent crashes. The mod responsible for the registration needs to correct this.", data.filledContainer.getItem().getTranslationKey(data.filledContainer)); return false; } containerFluidMap.put(new ContainerKey(data.filledContainer), data); diff --git a/src/main/java/growthcraft/core/shared/utils/LootUtils.java b/src/main/java/growthcraft/core/shared/utils/LootUtils.java index dfad62ba..6351dce4 100644 --- a/src/main/java/growthcraft/core/shared/utils/LootUtils.java +++ b/src/main/java/growthcraft/core/shared/utils/LootUtils.java @@ -24,7 +24,7 @@ public static LootPool getOrCreateLootPool(LootTable lootTable, String poolId) { public static void addLootEntry(LootPool pool, Item item, int minCount, int maxCount, int weight) { LootFunction quantityFct = new SetCount(new LootCondition[]{}, new RandomValueRange(minCount, maxCount)); - pool.addEntry(new LootEntryItem(item, weight, 0, new LootFunction[]{quantityFct}, new LootCondition[]{}, "growthcraft." + item.getUnlocalizedName())); + pool.addEntry(new LootEntryItem(item, weight, 0, new LootFunction[]{quantityFct}, new LootCondition[]{}, "growthcraft." + item.getTranslationKey())); } public static void addLootEntry(LootPool pool, ItemStack itemStack, int minCount, int maxCount, int weight) { @@ -32,7 +32,7 @@ public static void addLootEntry(LootPool pool, ItemStack itemStack, int minCount LootFunction quantityFct = new SetCount(new LootCondition[]{}, new RandomValueRange(minCount, maxCount)); Item item = itemStack.getItem(); - String name = "growthcraft." + item.getUnlocalizedName() + "." + itemStack.getMetadata(); + String name = "growthcraft." + item.getTranslationKey() + "." + itemStack.getMetadata(); pool.addEntry(new LootEntryItem(item, weight, 0, new LootFunction[]{metaFct, quantityFct}, new LootCondition[]{}, name)); } diff --git a/src/main/java/growthcraft/fishtrap/common/block/BlockFishtrap.java b/src/main/java/growthcraft/fishtrap/common/block/BlockFishtrap.java index 23f65296..6324a347 100644 --- a/src/main/java/growthcraft/fishtrap/common/block/BlockFishtrap.java +++ b/src/main/java/growthcraft/fishtrap/common/block/BlockFishtrap.java @@ -30,7 +30,7 @@ public class BlockFishtrap extends GrowthcraftBlockContainer { public BlockFishtrap(String unlocalizedName) { super(Material.WOOD); this.setTileEntityType(TileEntityFishtrap.class); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHardness(1.0F); this.setSoundType(SoundType.WOOD); diff --git a/src/main/java/growthcraft/fishtrap/common/tileentity/TileEntityFishtrap.java b/src/main/java/growthcraft/fishtrap/common/tileentity/TileEntityFishtrap.java index 5ccc3ba1..9e708447 100644 --- a/src/main/java/growthcraft/fishtrap/common/tileentity/TileEntityFishtrap.java +++ b/src/main/java/growthcraft/fishtrap/common/tileentity/TileEntityFishtrap.java @@ -107,7 +107,7 @@ public boolean hasBait(boolean strict) { List oreDictionaryBaitFishing = OreDictionary.getOres("baitFishing"); ItemStack baitStack = this.handlerInput.getStackInSlot(0); for (ItemStack itemStack : oreDictionaryBaitFishing) { - if (itemStack.getUnlocalizedName().contentEquals(baitStack.getUnlocalizedName())) { + if (itemStack.getTranslationKey().contentEquals(baitStack.getTranslationKey())) { return true; } } diff --git a/src/main/java/growthcraft/grapes/common/blocks/BlockGrapeFruit.java b/src/main/java/growthcraft/grapes/common/blocks/BlockGrapeFruit.java index bb25c9c9..dc05dc26 100644 --- a/src/main/java/growthcraft/grapes/common/blocks/BlockGrapeFruit.java +++ b/src/main/java/growthcraft/grapes/common/blocks/BlockGrapeFruit.java @@ -92,7 +92,7 @@ public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, @SideOnly(Side.CLIENT) @Override - public BlockRenderLayer getBlockLayer() { + public BlockRenderLayer getRenderLayer() { return BlockRenderLayer.CUTOUT; } diff --git a/src/main/java/growthcraft/grapes/common/blocks/BlockGrapeLeaves.java b/src/main/java/growthcraft/grapes/common/blocks/BlockGrapeLeaves.java index 81b91700..9320e40a 100644 --- a/src/main/java/growthcraft/grapes/common/blocks/BlockGrapeLeaves.java +++ b/src/main/java/growthcraft/grapes/common/blocks/BlockGrapeLeaves.java @@ -162,7 +162,7 @@ public void grow(World worldIn, Random rand, BlockPos pos, IBlockState state) { if (canGrowOutwardsOnRope(worldIn, pos)) { final EnumFacing dir = BlockCheck.DIR4[rand.nextInt(4)]; - BlockPos posDir = pos.add(dir.getFrontOffsetX(), 0, dir.getFrontOffsetZ()); + BlockPos posDir = pos.add(dir.getXOffset(), 0, dir.getZOffset()); if (canGrowHere(worldIn, posDir)) { int type = state.getValue(SUBTYPE); worldIn.setBlockState(posDir, getDefaultState().withProperty(SUBTYPE, type), BlockFlags.UPDATE_AND_SYNC); @@ -193,7 +193,7 @@ public boolean canGrow(World worldIn, BlockPos pos, IBlockState state, boolean i for (int i = 0; i < 4; i++) { final EnumFacing dir = BlockCheck.DIR4[i]; - BlockPos posDir = pos.add(dir.getFrontOffsetX(), 0, dir.getFrontOffsetZ()); + BlockPos posDir = pos.add(dir.getXOffset(), 0, dir.getZOffset()); if (canGrowHere(worldIn, posDir)) { return true; @@ -205,7 +205,7 @@ public boolean canGrow(World worldIn, BlockPos pos, IBlockState state, boolean i @Override @SideOnly(Side.CLIENT) - public BlockRenderLayer getBlockLayer() { + public BlockRenderLayer getRenderLayer() { return BlockRenderLayer.CUTOUT; } diff --git a/src/main/java/growthcraft/grapes/common/items/ItemGrape.java b/src/main/java/growthcraft/grapes/common/items/ItemGrape.java index 0dbcc8c1..c249f579 100644 --- a/src/main/java/growthcraft/grapes/common/items/ItemGrape.java +++ b/src/main/java/growthcraft/grapes/common/items/ItemGrape.java @@ -12,7 +12,7 @@ public class ItemGrape extends ItemFood { public ItemGrape(String unlocalizedName, int amount, float saturation, boolean isWolfFood) { super(amount, saturation, isWolfFood); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHasSubtypes(true); } @@ -28,15 +28,15 @@ public void getSubItems(CreativeTabs tab, NonNullList subItems) { } @Override - public String getUnlocalizedName(ItemStack stack) { + public String getTranslationKey(ItemStack stack) { for (int i = 0; i < GrapeTypes.values().length; i++) { GrapeTypes type = GrapeTypes.values()[i]; if (stack.getItemDamage() == type.getVariantID()) { - return this.getUnlocalizedName() + "." + type.getName(); + return this.getTranslationKey() + "." + type.getName(); } else { continue; } } - return super.getUnlocalizedName() + "." + GrapeTypes.PURPLE.getName(); + return super.getTranslationKey() + "." + GrapeTypes.PURPLE.getName(); } } diff --git a/src/main/java/growthcraft/grapes/common/items/ItemGrapeSeed.java b/src/main/java/growthcraft/grapes/common/items/ItemGrapeSeed.java index 06c70942..4797ca1f 100644 --- a/src/main/java/growthcraft/grapes/common/items/ItemGrapeSeed.java +++ b/src/main/java/growthcraft/grapes/common/items/ItemGrapeSeed.java @@ -21,22 +21,22 @@ public class ItemGrapeSeed extends ItemSeeds implements IPlantable { public ItemGrapeSeed(String unlocalizedName) { super(GrowthcraftGrapesBlocks.grapeVine0.getBlock(), Blocks.FARMLAND); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHasSubtypes(true); } @Override - public String getUnlocalizedName(ItemStack stack) { + public String getTranslationKey(ItemStack stack) { for (int i = 0; i < GrapeTypes.values().length; i++) { GrapeTypes type = GrapeTypes.values()[i]; if (stack.getItemDamage() == type.getVariantID()) { - return this.getUnlocalizedName() + "." + type.getName(); + return this.getTranslationKey() + "." + type.getName(); } else { continue; } } - return super.getUnlocalizedName() + "." + GrapeTypes.PURPLE.getName(); + return super.getTranslationKey() + "." + GrapeTypes.PURPLE.getName(); } /** diff --git a/src/main/java/growthcraft/grapes/shared/init/GrowthcraftGrapesItems.java b/src/main/java/growthcraft/grapes/shared/init/GrowthcraftGrapesItems.java index 642b3512..5a58ea49 100644 --- a/src/main/java/growthcraft/grapes/shared/init/GrowthcraftGrapesItems.java +++ b/src/main/java/growthcraft/grapes/shared/init/GrowthcraftGrapesItems.java @@ -23,9 +23,9 @@ private GrowthcraftGrapesItems() { public static ItemTypeDefinition grapeWine; public enum GrapeTypes implements IStringSerializable, IItemStackFactory, IObjectVariant, IGrapeType { - PURPLE(EnumDyeColor.PURPLE.getMetadata(), EnumDyeColor.PURPLE.getUnlocalizedName()), - GREEN(EnumDyeColor.GREEN.getMetadata(), EnumDyeColor.GREEN.getUnlocalizedName()), - RED(EnumDyeColor.RED.getMetadata(), EnumDyeColor.RED.getUnlocalizedName()); + PURPLE(EnumDyeColor.PURPLE.getMetadata(), EnumDyeColor.PURPLE.getTranslationKey()), + GREEN(EnumDyeColor.GREEN.getMetadata(), EnumDyeColor.GREEN.getTranslationKey()), + RED(EnumDyeColor.RED.getMetadata(), EnumDyeColor.RED.getTranslationKey()); private int ID; private String NAME; diff --git a/src/main/java/growthcraft/hops/common/block/BlockHops.java b/src/main/java/growthcraft/hops/common/block/BlockHops.java index 7be4411e..f16514cb 100644 --- a/src/main/java/growthcraft/hops/common/block/BlockHops.java +++ b/src/main/java/growthcraft/hops/common/block/BlockHops.java @@ -73,7 +73,7 @@ private HopsStage() { public BlockHops(String unlocalizedName) { super(Material.PLANTS); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); setHardness(0.0F); setSoundType(SoundType.PLANT); diff --git a/src/main/java/growthcraft/hops/common/item/ItemHops.java b/src/main/java/growthcraft/hops/common/item/ItemHops.java index 7672594f..fe91e942 100644 --- a/src/main/java/growthcraft/hops/common/item/ItemHops.java +++ b/src/main/java/growthcraft/hops/common/item/ItemHops.java @@ -7,7 +7,7 @@ public class ItemHops extends Item { public ItemHops(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } diff --git a/src/main/java/growthcraft/hops/common/item/ItemSeedHops.java b/src/main/java/growthcraft/hops/common/item/ItemSeedHops.java index 2b58ef27..cf128772 100644 --- a/src/main/java/growthcraft/hops/common/item/ItemSeedHops.java +++ b/src/main/java/growthcraft/hops/common/item/ItemSeedHops.java @@ -19,7 +19,7 @@ public class ItemSeedHops extends ItemSeeds { public ItemSeedHops(String unlocalizedName) { super(GrowthcraftHopsBlocks.hops.getBlock(), Blocks.FARMLAND); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } diff --git a/src/main/java/growthcraft/milk/common/block/BlockButterChurn.java b/src/main/java/growthcraft/milk/common/block/BlockButterChurn.java index 1fd763d0..c5636fbc 100644 --- a/src/main/java/growthcraft/milk/common/block/BlockButterChurn.java +++ b/src/main/java/growthcraft/milk/common/block/BlockButterChurn.java @@ -34,7 +34,7 @@ public class BlockButterChurn extends GrowthcraftRotatableBlockContainer { public BlockButterChurn(String unlocalizedName) { super(Material.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setResistance(5.0F); this.setHardness(2.0F); diff --git a/src/main/java/growthcraft/milk/common/block/BlockButterChurnPlunger.java b/src/main/java/growthcraft/milk/common/block/BlockButterChurnPlunger.java index f37caccc..646a0972 100644 --- a/src/main/java/growthcraft/milk/common/block/BlockButterChurnPlunger.java +++ b/src/main/java/growthcraft/milk/common/block/BlockButterChurnPlunger.java @@ -44,7 +44,7 @@ public class BlockButterChurnPlunger extends GrowthcraftRotatableBlockContainer public BlockButterChurnPlunger(String unlocalizedName) { super(Material.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setResistance(5.0F); this.setHardness(2.0F); diff --git a/src/main/java/growthcraft/milk/common/block/BlockCheesePress.java b/src/main/java/growthcraft/milk/common/block/BlockCheesePress.java index 236acc86..aaff7415 100644 --- a/src/main/java/growthcraft/milk/common/block/BlockCheesePress.java +++ b/src/main/java/growthcraft/milk/common/block/BlockCheesePress.java @@ -39,7 +39,7 @@ public class BlockCheesePress extends BlockOrientable { public BlockCheesePress(String unlocalizedName) { super(Material.WOOD); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setResistance(5.0F); this.setHardness(2.0F); diff --git a/src/main/java/growthcraft/milk/common/block/BlockCheeseVat.java b/src/main/java/growthcraft/milk/common/block/BlockCheeseVat.java index 4046a44b..8cfa701c 100644 --- a/src/main/java/growthcraft/milk/common/block/BlockCheeseVat.java +++ b/src/main/java/growthcraft/milk/common/block/BlockCheeseVat.java @@ -55,7 +55,7 @@ public class BlockCheeseVat extends GrowthcraftBlockContainer implements ITheOne public BlockCheeseVat(String unlocalizedName) { super(Material.IRON, MapColor.STONE); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setResistance(5.0F); this.setHardness(2.0F); diff --git a/src/main/java/growthcraft/milk/common/block/BlockHangingCurds.java b/src/main/java/growthcraft/milk/common/block/BlockHangingCurds.java index 6900bb80..a7adf630 100644 --- a/src/main/java/growthcraft/milk/common/block/BlockHangingCurds.java +++ b/src/main/java/growthcraft/milk/common/block/BlockHangingCurds.java @@ -80,7 +80,7 @@ public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, } @Override - public BlockRenderLayer getBlockLayer() { + public BlockRenderLayer getRenderLayer() { return BlockRenderLayer.CUTOUT_MIPPED; } diff --git a/src/main/java/growthcraft/milk/common/block/BlockPancheon.java b/src/main/java/growthcraft/milk/common/block/BlockPancheon.java index 095f1dfe..01e74a99 100644 --- a/src/main/java/growthcraft/milk/common/block/BlockPancheon.java +++ b/src/main/java/growthcraft/milk/common/block/BlockPancheon.java @@ -25,7 +25,7 @@ public class BlockPancheon extends GrowthcraftBlockContainer { public BlockPancheon(String unlocalizedName) { super(Material.CLAY); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHardness(0.6F); this.setHarvestLevel("pickaxe", 1); diff --git a/src/main/java/growthcraft/milk/common/block/BlockThistle.java b/src/main/java/growthcraft/milk/common/block/BlockThistle.java index 374e720b..f7725c6a 100644 --- a/src/main/java/growthcraft/milk/common/block/BlockThistle.java +++ b/src/main/java/growthcraft/milk/common/block/BlockThistle.java @@ -33,7 +33,7 @@ public class BlockThistle extends BlockCrops implements IGrowable, IPlantable { private static final AxisAlignedBB BOUNDING_BOX_3 = new AxisAlignedBB(0.0625 * 2, 0.0625 * 0, 0.0625 * 2, 0.0625 * 14, 0.0625 * 16, 0.0625 * 14); public BlockThistle(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } @@ -67,7 +67,7 @@ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, Bloc @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) { super.addInformation(stack, worldIn, tooltip, flagIn); - tooltip.add(TextFormatting.BLUE + I18n.format(this.getUnlocalizedName() + ".tooltip")); + tooltip.add(TextFormatting.BLUE + I18n.format(this.getTranslationKey() + ".tooltip")); } @Override diff --git a/src/main/java/growthcraft/milk/common/item/ItemAgedCheeseSlice.java b/src/main/java/growthcraft/milk/common/item/ItemAgedCheeseSlice.java index e33ec28b..d775a99e 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemAgedCheeseSlice.java +++ b/src/main/java/growthcraft/milk/common/item/ItemAgedCheeseSlice.java @@ -12,7 +12,7 @@ public class ItemAgedCheeseSlice extends ItemFood { public ItemAgedCheeseSlice(String unlocalizedName, int amount, float saturation, boolean isWolfFood) { super(amount, saturation, isWolfFood); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHasSubtypes(true); } @@ -29,14 +29,14 @@ public void getSubItems(CreativeTabs tab, NonNullList subItems) { } @Override - public String getUnlocalizedName(ItemStack stack) { + public String getTranslationKey(ItemStack stack) { for (int i = 0; i < AgedCheeseTypes.values().length; i++) { if (stack.getItemDamage() == i) { - return this.getUnlocalizedName() + "." + AgedCheeseTypes.values()[i].getName(); + return this.getTranslationKey() + "." + AgedCheeseTypes.values()[i].getName(); } else { continue; } } - return super.getUnlocalizedName() + "." + AgedCheeseTypes.GORGONZOLA.getName(); + return super.getTranslationKey() + "." + AgedCheeseTypes.GORGONZOLA.getName(); } } diff --git a/src/main/java/growthcraft/milk/common/item/ItemBlockCheeseBlock.java b/src/main/java/growthcraft/milk/common/item/ItemBlockCheeseBlock.java index 0cd6aaba..53e7cfab 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemBlockCheeseBlock.java +++ b/src/main/java/growthcraft/milk/common/item/ItemBlockCheeseBlock.java @@ -94,9 +94,9 @@ public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos p @Override - public String getUnlocalizedName(ItemStack stack) { - return super.getUnlocalizedName(stack) + - "." + getCheeseType(stack).getRegistryName().getResourcePath() + + public String getTranslationKey(ItemStack stack) { + return super.getTranslationKey(stack) + + "." + getCheeseType(stack).getRegistryName().getPath() + "." + getCheeseStage(stack).getName(); } diff --git a/src/main/java/growthcraft/milk/common/item/ItemBlockHangingCurds.java b/src/main/java/growthcraft/milk/common/item/ItemBlockHangingCurds.java index 05196238..a8d75307 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemBlockHangingCurds.java +++ b/src/main/java/growthcraft/milk/common/item/ItemBlockHangingCurds.java @@ -69,9 +69,9 @@ public boolean isDried(ItemStack stack) { } @Override - public String getUnlocalizedName(ItemStack stack) { - String str = super.getUnlocalizedName(stack); - str += "." + getCheeseType(stack).getRegistryName().getResourcePath(); + public String getTranslationKey(ItemStack stack) { + String str = super.getTranslationKey(stack); + str += "." + getCheeseType(stack).getRegistryName().getPath(); if (isDried(stack)) str += ".dried"; return str; } diff --git a/src/main/java/growthcraft/milk/common/item/ItemButter.java b/src/main/java/growthcraft/milk/common/item/ItemButter.java index 502fb146..52f1fa37 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemButter.java +++ b/src/main/java/growthcraft/milk/common/item/ItemButter.java @@ -12,7 +12,7 @@ public class ItemButter extends ItemFood { public ItemButter(String unlocalizedName, int amount, float saturation, boolean isWolfFood) { super(amount, saturation, isWolfFood); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHasSubtypes(true); } @@ -27,14 +27,14 @@ public void getSubItems(CreativeTabs tab, NonNullList subItems) { } @Override - public String getUnlocalizedName(ItemStack stack) { + public String getTranslationKey(ItemStack stack) { for (int i = 0; i < ButterTypes.values().length; i++) { if (stack.getItemDamage() == i) { - return this.getUnlocalizedName() + "." + ButterTypes.values()[i].getName(); + return this.getTranslationKey() + "." + ButterTypes.values()[i].getName(); } else { continue; } } - return super.getUnlocalizedName() + "." + ButterTypes.UNSALTED.getName(); + return super.getTranslationKey() + "." + ButterTypes.UNSALTED.getName(); } } diff --git a/src/main/java/growthcraft/milk/common/item/ItemCheeseCloth.java b/src/main/java/growthcraft/milk/common/item/ItemCheeseCloth.java index 6ebc2ba2..299390f6 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemCheeseCloth.java +++ b/src/main/java/growthcraft/milk/common/item/ItemCheeseCloth.java @@ -7,7 +7,7 @@ public class ItemCheeseCloth extends Item { public ItemCheeseCloth(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } diff --git a/src/main/java/growthcraft/milk/common/item/ItemIceCream.java b/src/main/java/growthcraft/milk/common/item/ItemIceCream.java index 69482279..5e4442c9 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemIceCream.java +++ b/src/main/java/growthcraft/milk/common/item/ItemIceCream.java @@ -21,7 +21,7 @@ public class ItemIceCream extends ItemFood { public ItemIceCream(String unlocalizedName, int amount, float saturation, boolean isWolfFood) { super(amount, saturation, isWolfFood); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHasSubtypes(true); } @@ -37,15 +37,15 @@ public void getSubItems(CreativeTabs tab, NonNullList subItems) { } @Override - public String getUnlocalizedName(ItemStack stack) { + public String getTranslationKey(ItemStack stack) { for (int i = 0; i < IceCreamTypes.values().length; i++) { if (stack.getItemDamage() == i) { - return this.getUnlocalizedName() + "." + IceCreamTypes.values()[i].getName(); + return this.getTranslationKey() + "." + IceCreamTypes.values()[i].getName(); } else { continue; } } - return super.getUnlocalizedName() + "." + IceCreamTypes.PLAIN.getName(); + return super.getTranslationKey() + "." + IceCreamTypes.PLAIN.getName(); } /** diff --git a/src/main/java/growthcraft/milk/common/item/ItemKnife.java b/src/main/java/growthcraft/milk/common/item/ItemKnife.java index e8f2e30c..52d884bf 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemKnife.java +++ b/src/main/java/growthcraft/milk/common/item/ItemKnife.java @@ -7,7 +7,7 @@ public class ItemKnife extends Item { public ItemKnife(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setContainerItem(this); } diff --git a/src/main/java/growthcraft/milk/common/item/ItemSeedThistle.java b/src/main/java/growthcraft/milk/common/item/ItemSeedThistle.java index 4fad2394..2bc3ce24 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemSeedThistle.java +++ b/src/main/java/growthcraft/milk/common/item/ItemSeedThistle.java @@ -10,7 +10,7 @@ public class ItemSeedThistle extends ItemSeeds { public ItemSeedThistle(String unlocalizedName) { super(GrowthcraftMilkBlocks.thistle.getBlock(), Blocks.FARMLAND); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } diff --git a/src/main/java/growthcraft/milk/common/item/ItemSimpleCheeseSlice.java b/src/main/java/growthcraft/milk/common/item/ItemSimpleCheeseSlice.java index 9a15dd84..7d67eccb 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemSimpleCheeseSlice.java +++ b/src/main/java/growthcraft/milk/common/item/ItemSimpleCheeseSlice.java @@ -12,7 +12,7 @@ public class ItemSimpleCheeseSlice extends ItemFood { public ItemSimpleCheeseSlice(String unlocalizedName, int amount, float saturation, boolean isWolfFood) { super(amount, saturation, isWolfFood); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHasSubtypes(true); } @@ -28,14 +28,14 @@ public void getSubItems(CreativeTabs tab, NonNullList subItems) { } @Override - public String getUnlocalizedName(ItemStack stack) { + public String getTranslationKey(ItemStack stack) { for (int i = 0; i < SimpleCheeseTypes.values().length; i++) { if (stack.getItemDamage() == i) { - return this.getUnlocalizedName() + "." + SimpleCheeseTypes.values()[i].getName(); + return this.getTranslationKey() + "." + SimpleCheeseTypes.values()[i].getName(); } else { continue; } } - return super.getUnlocalizedName() + "." + SimpleCheeseTypes.RICOTTA.getName(); + return super.getTranslationKey() + "." + SimpleCheeseTypes.RICOTTA.getName(); } } diff --git a/src/main/java/growthcraft/milk/common/item/ItemStarterCulture.java b/src/main/java/growthcraft/milk/common/item/ItemStarterCulture.java index b00ee23a..15187560 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemStarterCulture.java +++ b/src/main/java/growthcraft/milk/common/item/ItemStarterCulture.java @@ -6,7 +6,7 @@ public class ItemStarterCulture extends Item { public ItemStarterCulture(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } } diff --git a/src/main/java/growthcraft/milk/common/item/ItemStomach.java b/src/main/java/growthcraft/milk/common/item/ItemStomach.java index bae0a73a..1d1e1d4a 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemStomach.java +++ b/src/main/java/growthcraft/milk/common/item/ItemStomach.java @@ -6,7 +6,7 @@ public class ItemStomach extends Item { public ItemStomach(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } } diff --git a/src/main/java/growthcraft/milk/common/item/ItemThistle.java b/src/main/java/growthcraft/milk/common/item/ItemThistle.java index ed9b0b63..f16773b0 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemThistle.java +++ b/src/main/java/growthcraft/milk/common/item/ItemThistle.java @@ -6,7 +6,7 @@ public class ItemThistle extends Item { public ItemThistle(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(Reference.MODID, unlocalizedName); } diff --git a/src/main/java/growthcraft/milk/common/item/ItemWaxedCheeseSlice.java b/src/main/java/growthcraft/milk/common/item/ItemWaxedCheeseSlice.java index a10f2a9e..6417bc38 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemWaxedCheeseSlice.java +++ b/src/main/java/growthcraft/milk/common/item/ItemWaxedCheeseSlice.java @@ -12,7 +12,7 @@ public class ItemWaxedCheeseSlice extends ItemFood { public ItemWaxedCheeseSlice(String unlocalizedName, int amount, float saturation, boolean isWolfFood) { super(amount, saturation, isWolfFood); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHasSubtypes(true); } @@ -28,14 +28,14 @@ public void getSubItems(CreativeTabs tab, NonNullList subItems) { } @Override - public String getUnlocalizedName(ItemStack stack) { + public String getTranslationKey(ItemStack stack) { for (int i = 0; i < WaxedCheeseTypes.values().length; i++) { if (stack.getItemDamage() == i) { - return this.getUnlocalizedName() + "." + WaxedCheeseTypes.values()[i].getName(); + return this.getTranslationKey() + "." + WaxedCheeseTypes.values()[i].getName(); } else { continue; } } - return super.getUnlocalizedName() + "." + WaxedCheeseTypes.CHEDDAR.getName(); + return super.getTranslationKey() + "." + WaxedCheeseTypes.CHEDDAR.getName(); } } diff --git a/src/main/java/growthcraft/milk/common/item/ItemYogurt.java b/src/main/java/growthcraft/milk/common/item/ItemYogurt.java index 080ec7c5..f89ff56f 100644 --- a/src/main/java/growthcraft/milk/common/item/ItemYogurt.java +++ b/src/main/java/growthcraft/milk/common/item/ItemYogurt.java @@ -21,7 +21,7 @@ public class ItemYogurt extends ItemFood { public ItemYogurt(String unlocalizedName, int amount, float saturation, boolean isWolfFood) { super(amount, saturation, isWolfFood); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); this.setHasSubtypes(true); } @@ -37,15 +37,15 @@ public void getSubItems(CreativeTabs tab, NonNullList subItems) { } @Override - public String getUnlocalizedName(ItemStack stack) { + public String getTranslationKey(ItemStack stack) { for (int i = 0; i < YogurtTypes.values().length; i++) { if (stack.getItemDamage() == i) { - return this.getUnlocalizedName() + "." + YogurtTypes.values()[i].getName(); + return this.getTranslationKey() + "." + YogurtTypes.values()[i].getName(); } else { continue; } } - return super.getUnlocalizedName() + "." + YogurtTypes.PLAIN.getName(); + return super.getTranslationKey() + "." + YogurtTypes.PLAIN.getName(); } /** diff --git a/src/main/java/growthcraft/milk/shared/cheese/CheeseIO.java b/src/main/java/growthcraft/milk/shared/cheese/CheeseIO.java index a40c92b8..d40ee8ef 100644 --- a/src/main/java/growthcraft/milk/shared/cheese/CheeseIO.java +++ b/src/main/java/growthcraft/milk/shared/cheese/CheeseIO.java @@ -28,8 +28,8 @@ public static ICheeseType loadFromNBT(NBTTagCompound nbt) { public static NBTTagCompound writeToNBT(NBTTagCompound tag, ICheeseType type) { ResourceLocation name = type.getRegistryName(); - tag.setString("cheese_modid", name.getResourceDomain()); - tag.setString("cheese_name", name.getResourcePath()); + tag.setString("cheese_modid", name.getNamespace()); + tag.setString("cheese_name", name.getPath()); return tag; } } diff --git a/src/main/java/growthcraft/milk/shared/init/GrowthcraftMilkItems.java b/src/main/java/growthcraft/milk/shared/init/GrowthcraftMilkItems.java index 9a3ba7e3..875838de 100644 --- a/src/main/java/growthcraft/milk/shared/init/GrowthcraftMilkItems.java +++ b/src/main/java/growthcraft/milk/shared/init/GrowthcraftMilkItems.java @@ -212,7 +212,7 @@ public String toString() { @Override public String getName() { - return this.name.getResourcePath(); + return this.name.getPath(); } @Override @@ -303,7 +303,7 @@ public String toString() { @Override public String getName() { - return this.name.getResourcePath(); + return this.name.getPath(); } @Override @@ -387,7 +387,7 @@ public String toString() { @Override public String getName() { - return this.name.getResourcePath(); + return this.name.getPath(); } @Override diff --git a/src/main/java/growthcraft/rice/common/block/BlockPaddy.java b/src/main/java/growthcraft/rice/common/block/BlockPaddy.java index 2597dbc6..ae845d98 100644 --- a/src/main/java/growthcraft/rice/common/block/BlockPaddy.java +++ b/src/main/java/growthcraft/rice/common/block/BlockPaddy.java @@ -27,7 +27,7 @@ public class BlockPaddy extends BlockPaddyBase { public BlockPaddy(String unlocalizedName) { super(Material.GROUND); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(Reference.MODID, unlocalizedName); this.setHardness(0.5F); this.setSoundType(SoundType.GROUND); @@ -45,7 +45,7 @@ public int quantityDropped(Random random) { @Override public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player) { - super.onBlockDestroyedByPlayer(worldIn, pos, state); + super.onPlayerDestroy(worldIn, pos, state); if (!player.capabilities.isCreativeMode) { Block.spawnAsEntity(worldIn, pos, new ItemStack(Item.getItemFromBlock(Blocks.DIRT), 1)); diff --git a/src/main/java/growthcraft/rice/common/block/BlockRiceCrop.java b/src/main/java/growthcraft/rice/common/block/BlockRiceCrop.java index b731902c..3f5ee20c 100644 --- a/src/main/java/growthcraft/rice/common/block/BlockRiceCrop.java +++ b/src/main/java/growthcraft/rice/common/block/BlockRiceCrop.java @@ -48,7 +48,7 @@ private RiceStage() { } public BlockRiceCrop(String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(Reference.MODID, unlocalizedName); } diff --git a/src/main/java/growthcraft/rice/common/item/ItemCultivator.java b/src/main/java/growthcraft/rice/common/item/ItemCultivator.java index 66f62c99..0b6c97ea 100644 --- a/src/main/java/growthcraft/rice/common/item/ItemCultivator.java +++ b/src/main/java/growthcraft/rice/common/item/ItemCultivator.java @@ -24,7 +24,7 @@ public class ItemCultivator extends ItemHoe { public ItemCultivator(String unlocalizedName) { super(ToolMaterial.IRON); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(Reference.MODID, unlocalizedName); } diff --git a/src/main/java/growthcraft/rice/common/item/ItemFoodRice.java b/src/main/java/growthcraft/rice/common/item/ItemFoodRice.java index 8fc92045..6d2162bc 100644 --- a/src/main/java/growthcraft/rice/common/item/ItemFoodRice.java +++ b/src/main/java/growthcraft/rice/common/item/ItemFoodRice.java @@ -7,7 +7,7 @@ public class ItemFoodRice extends GrowthcraftItemFoodBase { public ItemFoodRice(String unlocalizedName) { super(2, false); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(Reference.MODID, unlocalizedName); } diff --git a/src/main/java/growthcraft/rice/common/item/ItemRice.java b/src/main/java/growthcraft/rice/common/item/ItemRice.java index baa9ff22..1db0a9eb 100644 --- a/src/main/java/growthcraft/rice/common/item/ItemRice.java +++ b/src/main/java/growthcraft/rice/common/item/ItemRice.java @@ -18,7 +18,7 @@ public class ItemRice extends ItemSeeds { public ItemRice(String unlocalizedName) { super(GrowthcraftRiceBlocks.riceCrop.getBlock(), GrowthcraftRiceBlocks.ricePaddy.getBlock()); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName)); } diff --git a/src/main/java/growthcraft/rice/common/item/ItemRiceBall.java b/src/main/java/growthcraft/rice/common/item/ItemRiceBall.java index 6c8b5b3a..4f12590b 100644 --- a/src/main/java/growthcraft/rice/common/item/ItemRiceBall.java +++ b/src/main/java/growthcraft/rice/common/item/ItemRiceBall.java @@ -8,7 +8,7 @@ public class ItemRiceBall extends GrowthcraftItemFoodBase { public ItemRiceBall(String unlocalizedName) { super(5, false); this.setMaxStackSize(64); - this.setUnlocalizedName(unlocalizedName); + this.setTranslationKey(unlocalizedName); this.setRegistryName(Reference.MODID, unlocalizedName); } From eb7faa493f7aa6637f38e2b4c1ea6b7beeaad709 Mon Sep 17 00:00:00 2001 From: Doenerstyle <103001779+Doenerstyle@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:43:56 +0100 Subject: [PATCH 03/11] Fixed some leaves using broken textures Affected leaves are Apple Leaves, Bamboo Leaves, and Cork Leaves --- .../apples/common/block/BlockAppleLeaves.java | 16 ++++++++++++++++ .../bamboo/common/block/BlockBambooLeaves.java | 7 +++++-- .../cellar/common/block/BlockCorkLeaves.java | 18 +++++++++++++++++- .../shared/block/GrowthcraftBlockLeaves.java | 12 ++++++++++-- 4 files changed, 48 insertions(+), 5 deletions(-) diff --git a/src/main/java/growthcraft/apples/common/block/BlockAppleLeaves.java b/src/main/java/growthcraft/apples/common/block/BlockAppleLeaves.java index 90b1bce3..272ecd53 100644 --- a/src/main/java/growthcraft/apples/common/block/BlockAppleLeaves.java +++ b/src/main/java/growthcraft/apples/common/block/BlockAppleLeaves.java @@ -10,9 +10,12 @@ import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import java.util.Random; @@ -120,4 +123,17 @@ protected void dropApple(World worldIn, BlockPos pos, IBlockState state, int cha public Item getItemDropped(IBlockState state, Random rand, int fortune) { return GrowthcraftApplesBlocks.blockAppleSapling.getItem(); } + + // BlockRenderLayer.SOLID is currently a broken texture for this block. + @Override + @SideOnly(Side.CLIENT) + public BlockRenderLayer getRenderLayer() { + return BlockRenderLayer.CUTOUT_MIPPED; + } + + @Override + public boolean isOpaqueCube(IBlockState state) { + return false; + } + } diff --git a/src/main/java/growthcraft/bamboo/common/block/BlockBambooLeaves.java b/src/main/java/growthcraft/bamboo/common/block/BlockBambooLeaves.java index 1658465d..ea115714 100644 --- a/src/main/java/growthcraft/bamboo/common/block/BlockBambooLeaves.java +++ b/src/main/java/growthcraft/bamboo/common/block/BlockBambooLeaves.java @@ -17,6 +17,8 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.IShearable; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import javax.annotation.Nonnull; import java.util.Arrays; @@ -72,16 +74,17 @@ public List onSheared(@Nonnull ItemStack item, IBlockAccess world, Bl @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state) { - return false; + return Blocks.LEAVES.isOpaqueCube(state); } @SuppressWarnings("deprecation") @Override public boolean isFullCube(IBlockState state) { - return false; + return Blocks.LEAVES.isFullCube(state); } @Override + @SideOnly(Side.CLIENT) public BlockRenderLayer getRenderLayer() { return Blocks.LEAVES.getRenderLayer(); } diff --git a/src/main/java/growthcraft/cellar/common/block/BlockCorkLeaves.java b/src/main/java/growthcraft/cellar/common/block/BlockCorkLeaves.java index 5103b556..3749ee68 100644 --- a/src/main/java/growthcraft/cellar/common/block/BlockCorkLeaves.java +++ b/src/main/java/growthcraft/cellar/common/block/BlockCorkLeaves.java @@ -3,6 +3,10 @@ import growthcraft.cellar.shared.Reference; import growthcraft.cellar.shared.init.GrowthcraftCellarBlocks; import growthcraft.core.shared.block.GrowthcraftBlockLeaves; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.BlockRenderLayer; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; public class BlockCorkLeaves extends GrowthcraftBlockLeaves { public static final int LEAVES_COLOR = 0x013220; @@ -10,5 +14,17 @@ public class BlockCorkLeaves extends GrowthcraftBlockLeaves { public BlockCorkLeaves(String unlocalizedName) { super(Reference.MODID, unlocalizedName, GrowthcraftCellarBlocks.blockCorkSapling); } - + + // BlockRenderLayer.SOLID is currently a broken texture for this block. + @Override + @SideOnly(Side.CLIENT) + public BlockRenderLayer getRenderLayer() { + return BlockRenderLayer.CUTOUT_MIPPED; + } + + @Override + public boolean isOpaqueCube(IBlockState state) { + return false; + } + } diff --git a/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockLeaves.java b/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockLeaves.java index 7c6875ea..eede9031 100644 --- a/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockLeaves.java +++ b/src/main/java/growthcraft/core/shared/block/GrowthcraftBlockLeaves.java @@ -47,12 +47,20 @@ public GrowthcraftBlockLeaves(String modid, String unlocalizedName, BlockDefinit public BlockRenderLayer getRenderLayer() { return Blocks.LEAVES.getRenderLayer(); } - + + @SuppressWarnings("deprecation") @Override public boolean isOpaqueCube(IBlockState state) { return Blocks.LEAVES.isOpaqueCube(state); } - + + @SuppressWarnings("deprecation") + @Override + public boolean isFullCube(IBlockState state) { + return Blocks.LEAVES.isFullCube(state); + } + + @SuppressWarnings("deprecation") @SideOnly(Side.CLIENT) @Override public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) { From a40fbe793712cc264810c0639cff7a8466460511 Mon Sep 17 00:00:00 2001 From: Doenerstyle <103001779+Doenerstyle@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:44:55 +0100 Subject: [PATCH 04/11] Fixed CraftTweaker being a hard dependency --- src/main/java/growthcraft/core/GrowthcraftCore.java | 10 ++++++---- .../java/growthcraft/core/shared/compat/Compat.java | 5 +++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/java/growthcraft/core/GrowthcraftCore.java b/src/main/java/growthcraft/core/GrowthcraftCore.java index 95f7faee..515f1508 100644 --- a/src/main/java/growthcraft/core/GrowthcraftCore.java +++ b/src/main/java/growthcraft/core/GrowthcraftCore.java @@ -80,10 +80,12 @@ public void preInit(FMLPreInitializationEvent event) { RecipeSorter.register("minecraft:shapeless_comparator", ShapelessItemComparableRecipe.class, Category.SHAPELESS, "after:minecraft:shapeless"); RecipeSorter.register("minecraft:shapeless_multi", ShapelessMultiRecipe.class, Category.SHAPELESS, "after:minecraft:shapeless"); - - CraftTweakerAPI.registerClass(BrewKettle.class); - CraftTweakerAPI.registerClass(FermentBarrel.class); - CraftTweakerAPI.registerClass(FruitPress.class); + + if (Compat.isModAvailableCraftTweaker()) { + CraftTweakerAPI.registerClass(BrewKettle.class); + CraftTweakerAPI.registerClass(FermentBarrel.class); + CraftTweakerAPI.registerClass(FruitPress.class); + } } @SubscribeEvent diff --git a/src/main/java/growthcraft/core/shared/compat/Compat.java b/src/main/java/growthcraft/core/shared/compat/Compat.java index 710eed42..33387cab 100644 --- a/src/main/java/growthcraft/core/shared/compat/Compat.java +++ b/src/main/java/growthcraft/core/shared/compat/Compat.java @@ -22,6 +22,7 @@ public class Compat { public static final String MODID_RUSTIC = "rustic"; public static final String MODID_THAUMCRAFT = "thaumcraft"; public static final String MODID_ANIMANIA = "animania"; + public static final String MODID_CRAFTTWEAKER = "crafttweaker"; private Compat() { /* Do Nothing */ } @@ -44,6 +45,10 @@ public static boolean isModAvailableThaumcraft() { public static boolean isModAvailableAnimania() { return Loader.isModLoaded(MODID_ANIMANIA); } + + public static boolean isModAvailableCraftTweaker() { + return Loader.isModLoaded(MODID_CRAFTTWEAKER); + } //////////// // Fluids From 7471a951360a389f3c52bc49ee6620954d48eb7d Mon Sep 17 00:00:00 2001 From: Doenerstyle <103001779+Doenerstyle@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:45:33 +0100 Subject: [PATCH 05/11] Removed unused import --- .../cellar/common/tileentity/device/YeastGenerator.java | 1 - .../fishtrap/shared/init/GrowthcraftFishtrapBlocks.java | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/main/java/growthcraft/cellar/common/tileentity/device/YeastGenerator.java b/src/main/java/growthcraft/cellar/common/tileentity/device/YeastGenerator.java index 1ac7ff61..70439f9e 100644 --- a/src/main/java/growthcraft/cellar/common/tileentity/device/YeastGenerator.java +++ b/src/main/java/growthcraft/cellar/common/tileentity/device/YeastGenerator.java @@ -3,7 +3,6 @@ import growthcraft.cellar.common.tileentity.TileEntityCellarDevice; import growthcraft.cellar.shared.CellarRegistry; import growthcraft.cellar.shared.booze.BoozeTag; -import growthcraft.cellar.shared.processing.common.IProcessingRecipe; import growthcraft.cellar.shared.processing.common.IProcessingRecipeBase; import growthcraft.cellar.shared.processing.yeast.YeastRegistry; import growthcraft.core.shared.CoreRegistry; diff --git a/src/main/java/growthcraft/fishtrap/shared/init/GrowthcraftFishtrapBlocks.java b/src/main/java/growthcraft/fishtrap/shared/init/GrowthcraftFishtrapBlocks.java index 78a41b49..890e91b3 100644 --- a/src/main/java/growthcraft/fishtrap/shared/init/GrowthcraftFishtrapBlocks.java +++ b/src/main/java/growthcraft/fishtrap/shared/init/GrowthcraftFishtrapBlocks.java @@ -2,8 +2,6 @@ import growthcraft.core.shared.definition.BlockDefinition; -import java.util.concurrent.BlockingQueue; - public class GrowthcraftFishtrapBlocks { private GrowthcraftFishtrapBlocks() { From 4edabfbc31f3473a555a07e4b5105959fbee14ab Mon Sep 17 00:00:00 2001 From: Doenerstyle <103001779+Doenerstyle@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:46:27 +0100 Subject: [PATCH 06/11] Fixed Cork Sapling having a broken name --- src/main/resources/assets/growthcraft_cellar/lang/en_us.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/growthcraft_cellar/lang/en_us.lang b/src/main/resources/assets/growthcraft_cellar/lang/en_us.lang index 5b1107d0..f14a0d7c 100644 --- a/src/main/resources/assets/growthcraft_cellar/lang/en_us.lang +++ b/src/main/resources/assets/growthcraft_cellar/lang/en_us.lang @@ -54,7 +54,7 @@ tile.brew_kettle.name=Brew Kettle tile.cork_leaves.name=Cork Leaves tile.cork_log.name=Cork Wood tile.cork_log_stripped.name=Cork Wood (Stripped) -tile.cork_sapling=Cork Sapling +tile.cork_sapling.name=Cork Sapling tile.culture_jar.name=Culture Jar tile.ferment_barrel.name=Fermentation Barrel tile.fruit_press.name=Fruit Press From 82f9c1ad0320f16edb421459368e2b7fe85eb4bc Mon Sep 17 00:00:00 2001 From: Doenerstyle <103001779+Doenerstyle@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:47:51 +0100 Subject: [PATCH 07/11] Made mod credits version-independent --- src/main/resources/mcmod.info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 5dd87e8a..86f2fc9c 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -12,7 +12,7 @@ "Avatair", "Kisutora" ], - "credits": "Gwafu for coming with a great mod and all the hard work of IceDragon200 and other contributors to GC-2.7", + "credits": "Gwafu for coming with a great mod and all the hard work of IceDragon200 and other contributors to Growthcraft", "logoFile": "", "screenshots": [], "dependencies": [ From 3d327c93f75af77a81c34decfba930dcbe9f4bf3 Mon Sep 17 00:00:00 2001 From: Doenerstyle <103001779+Doenerstyle@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:52:47 +0100 Subject: [PATCH 08/11] Updated README to better match styling of Growthcraft CE 1.20 --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 48f1dba0..bf5f52a9 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,22 @@ -Growthcraft +Growthcraft 4 for Minecraft 1.12.2 (Forge) =========== -[![](http://cf.way2muchnoise.eu/versions/growthcraft-community-edition_latest.svg)](https://minecraft.curseforge.com/projects/growthcraft-community-edition/) [![Growthcraft Version](https://img.shields.io/badge/Growthcraft-4.2.2-orange.svg)](https://github.com/GrowthcraftCE/Growthcraft-1.12) -[![Forge Version](https://img.shields.io/badge/Minecraft%20Forge-14.23.4.2768-yellow.svg)](http://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.12.2.html) -[![Java Version](https://img.shields.io/badge/JAVA-8-blue.svg)](https://www.java.com/en/) +[![](https://cf.way2muchnoise.eu/versions/growthcraft-community-edition_latest.svg)](https://www.curseforge.com/minecraft/mc-mods/growthcraft-community-edition) +[![](https://cf.way2muchnoise.eu/short_growthcraft-community-edition.svg)](https://www.curseforge.com/minecraft/mc-mods/growthcraft-community-edition) +[![Forge Version](https://img.shields.io/badge/Minecraft%20Forge-14.23.5.2847-yellow.svg)](https://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.12.2.html) + + [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FGrowthcraftCE%2FGrowthcraft-1.12%2Fbadge%3Fref%3Ddevelopment&style=flat)](https://actions-badge.atrox.dev/GrowthcraftCE/Growthcraft-1.12/goto?ref=development) +[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/GrowthcraftCE/Growthcraft-1.12) [![Discord Channel](https://img.shields.io/discord/333690296334548994.svg?color=green)](https://discord.gg/Quh76Jn) -[![](http://cf.way2muchnoise.eu/short_growthcraft-community-edition.svg)](https://minecraft.curseforge.com/projects/growthcraft-community-edition/) This is a second major community fork of the original GrowthCraft developed by Gwafu. -The original forum post can be found on the [Minecraft Forums mod page](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1286298-growthcraft-jul-15-2014-proper-1-7-10-release). We have created a [forum post](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2505072-growthcraft-community-edition-proper-1-7-10) for [Growthcraft CE](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2505072-growthcraft-community-edition-proper-1-7-10) for general discussions, announcements and feedback. We have a Discord chat group (https://discord.gg/Quh76Jn). +The original forum post can be found on the [Minecraft Forums mod page](https://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1286298-growthcraft-jul-15-2014-proper-1-7-10-release). We have created a [forum post](https://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2505072-growthcraft-community-edition-proper-1-7-10) for [Growthcraft CE](https://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2505072-growthcraft-community-edition-proper-1-7-10) for general discussions, announcements and feedback. We have a Discord chat group (https://discord.gg/Quh76Jn). ## Wiki -We are using the [Gamepedia FTB Wiki](http://ftb.gamepedia.com/GrowthCraft) for publishing how the plugins work and tutorials. -For technical details please read our [Github Wiki](https://github.com/GrowthcraftCE/Growthcraft-1.12/wiki). +We are using the [Gamepedia FTB Wiki](https://ftb.gamepedia.com/GrowthCraft) for publishing how the plugins work and tutorials. +For technical details please read our [GitHub Wiki](https://github.com/GrowthcraftCE/Growthcraft-1.12/wiki). ## Contributing @@ -22,4 +24,4 @@ For any contributions to this project, please refer to our [Contributing to Grow ## License -Until we find the right license model, for now we are allowing for others to modify the code for personal/private use. Do not ditribute your own version of the plugin, instead, submit your changes as this is a community project. If you add this mod or set of mods to your mod-pack, simply post an issue with a list of mods that you have included in your pack. It is that simple. We want the list of your mods so that we can determine where to invest time in cross-mod compatibility. +Until we find the right license model, for now we are allowing for others to modify the code for personal/private use. Do not distribute your own version of the plugin. Instead, submit your changes as this is a community project. If you add this mod or set of mods to your mod-pack, simply post an issue with a list of mods that you have included in your pack. It is that simple. We want the list of your mods so that we can determine where to invest time in cross-mod compatibility. From fefbf6771c42f21b697cefa3e96fd7db52242abf Mon Sep 17 00:00:00 2001 From: Doenerstyle <103001779+Doenerstyle@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:54:07 +0100 Subject: [PATCH 09/11] Updated actions used in GitHub workflows --- .github/workflows/gradle.yml | 12 ++++++------ .github/workflows/tagged-release.yml | 11 ++++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 255dda06..de368760 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -9,11 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - uses: actions/checkout@v4 + - name: Set up JDK 8 + uses: actions/setup-java@v4 with: - java-version: 1.8 + java-version: 8 + distribution: adopt - name: Setup Gradle run: chmod +x gradlew - name: Setup CI Workspace @@ -21,7 +22,7 @@ jobs: - name: Build with Gradle run: ./gradlew build - name: Setup sonarqube - uses: warchant/setup-sonar-scanner@v3 + uses: warchant/setup-sonar-scanner@v8 - name: Run sonarqube env: # to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN @@ -31,4 +32,3 @@ jobs: -Dsonar.organization=growthcraftce -Dsonar.host.url=https://sonarcloud.io/ -Dsonar.projectKey=growthcraft:Growthcraft-1.12 - diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml index 04267339..eddcf828 100644 --- a/.github/workflows/tagged-release.yml +++ b/.github/workflows/tagged-release.yml @@ -13,11 +13,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - uses: actions/checkout@v4 + - name: Set up JDK 8 + uses: actions/setup-java@v4 with: - java-version: 1.8 + java-version: 8 + distribution: adopt - name: Setup Gradle run: chmod +x gradlew - name: Setup CI Workspace @@ -25,7 +26,7 @@ jobs: - name: Build with Gradle run: ./gradlew build - name: Create GitHub Release - uses: Roang-zero1/github-create-release-action@master + uses: Roang-zero1/github-create-release-action@v3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload to GitHub From 7744ae8b36330a239c1f61e2bc7babb8d5c04dd6 Mon Sep 17 00:00:00 2001 From: Doenerstyle <103001779+Doenerstyle@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:07:25 +0100 Subject: [PATCH 10/11] Fixed Bee Box bias edge case Fixes #386 xJon/Hexxit-II#200 Fix taken from ACGaming/Growthcraft-1.12@8c9a2b6 --- .../growthcraft/bees/common/tileentity/device/DeviceBeeBox.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/growthcraft/bees/common/tileentity/device/DeviceBeeBox.java b/src/main/java/growthcraft/bees/common/tileentity/device/DeviceBeeBox.java index ac1652ac..302564a8 100644 --- a/src/main/java/growthcraft/bees/common/tileentity/device/DeviceBeeBox.java +++ b/src/main/java/growthcraft/bees/common/tileentity/device/DeviceBeeBox.java @@ -194,7 +194,7 @@ public void updateTick() { // if the biasSpawn isn't invalid if (biasSpawn > 0) { // the higher the bias, the less likely the operation will flip - if (random.nextInt(biasSpawn) == 0) { + if (random.nextInt(biasSpawn + 1) == 0) { // flip the operation shouldFill = !shouldFill; } From c3704678b63cc04eb610f5991e661ce3f63bc010 Mon Sep 17 00:00:00 2001 From: Doenerstyle <103001779+Doenerstyle@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:27:38 +0100 Subject: [PATCH 11/11] Added more detailled Simplified Chinese localization Localization provided by @Chsier in #385. Co-Authored-By: Chsier <55626062+chsier@users.noreply.github.com> --- .../assets/growthcraft_apples/lang/zh_cn.lang | 14 +- .../assets/growthcraft_bees/lang/zh_cn.lang | 43 +++++- .../assets/growthcraft_cellar/lang/zh_cn.lang | 23 ++- .../growthcraft_fishtrap/lang/zh_cn.lang | 9 ++ .../assets/growthcraft_grapes/lang/zh_cn.lang | 42 +++--- .../assets/growthcraft_hops/lang/zh_cn.lang | 2 + .../assets/growthcraft_milk/lang/zh_cn.lang | 139 +++++++++++++----- .../assets/growthcraft_rice/lang/zh_cn.lang | 21 +++ 8 files changed, 218 insertions(+), 75 deletions(-) create mode 100644 src/main/resources/assets/growthcraft_rice/lang/zh_cn.lang diff --git a/src/main/resources/assets/growthcraft_apples/lang/zh_cn.lang b/src/main/resources/assets/growthcraft_apples/lang/zh_cn.lang index bf14a791..4957e30d 100644 --- a/src/main/resources/assets/growthcraft_apples/lang/zh_cn.lang +++ b/src/main/resources/assets/growthcraft_apples/lang/zh_cn.lang @@ -11,10 +11,10 @@ tile.apple_slab_half.name=苹果木台阶 tile.apple_stairs.name=苹果木楼梯 tile.rope_knot_apple.name=Apple Fence (Rope) # Fluids -fluid.fluid_booze_apple_juice=Apple Juice -fluid.fluid_booze_apple_cider_fermented=Apple Cider -fluid.fluid_booze_apple_cider_potent=Apple Cider -fluid.fluid_booze_apple_cider_extended=Apple Cider -fluid.fluid_booze_apple_cider_ethereal=Silken Nectar -fluid.fluid_booze_apple_cider_intoxicated=Apple Cider -fluid.fluid_booze_apple_cider_poisoned=Apple Cider \ No newline at end of file +fluid.fluid_booze_apple_juice=苹果果汁 +fluid.fluid_booze_apple_cider_fermented=苹果西打酒 +fluid.fluid_booze_apple_cider_potent=苹果西打酒 +fluid.fluid_booze_apple_cider_extended=苹果西打酒 +fluid.fluid_booze_apple_cider_ethereal=柔顺果蜜酒 +fluid.fluid_booze_apple_cider_intoxicated=苹果西打酒 +fluid.fluid_booze_apple_cider_poisoned=苹果西打酒 diff --git a/src/main/resources/assets/growthcraft_bees/lang/zh_cn.lang b/src/main/resources/assets/growthcraft_bees/lang/zh_cn.lang index c24d86bc..924e6cb6 100644 --- a/src/main/resources/assets/growthcraft_bees/lang/zh_cn.lang +++ b/src/main/resources/assets/growthcraft_bees/lang/zh_cn.lang @@ -2,17 +2,46 @@ fluid.fluid_honey=蜂蜜 item.bee.name=蜜蜂 -item.bees_wax.normal.name=蜂蜡 -item.bees_wax.red.name=红色蜂蜡 -item.bees_wax.black.name=黑色蜂蜡 +item.bees_wax.white.name=白色 蜂蜡 +item.bees_wax.orange.name=橙色 蜂蜡 +item.bees_wax.magenta.name=品红色 蜂蜡 +item.bees_wax.lightBlue.name=浅蓝色 蜂蜡 +item.bees_wax.normal.name=黄色 蜂蜡 +item.bees_wax.lime.name=黄绿色 蜂蜡 +item.bees_wax.pink.name=粉红色 蜂蜡 +item.bees_wax.gray.name=灰色 蜂蜡 +item.bees_wax.silver.name=淡灰色 蜂蜡 +item.bees_wax.cyan.name=青色 蜂蜡 +item.bees_wax.purple.name=紫色 蜂蜡 +item.bees_wax.blue.name=蓝色 蜂蜡 +item.bees_wax.brown.name=棕色 蜂蜡 +item.bees_wax.green.name=绿色 蜂蜡 +item.bees_wax.red.name=红色 蜂蜡 +item.bees_wax.black.name=黑色 蜂蜡 -item.bottlefluid_honey.name=蜜罐 +item.bottlefluid_honey.name=蜂蜜瓶 -item.honey_comb_empty.name=蜂窝 -item.honey_comb_filled.name=蜂窝 +item.honey_comb_empty.name=蜂窝 (空) +item.honey_comb_filled.name=蜂窝 (满) -item.honey_jar.name=蜂蜜 +item.honey_jar.name=蜂蜜罐 container.growthcraft_bees.beeBox=蜂箱 tile.beebox.name=蜂箱 +tile.beehive.name=蜂窝 + +# Fluid Tags +fluids.tag.mead=蜂蜜酒 +fluids.tag.honey=蜂蜜 + +# Fluids +fluid.fluid_booze_mead_young=低度 蜂蜜酒 +fluid.fluid_booze_mead_fermented=发酵 蜂蜜酒 +fluid.fluid_booze_mead_potent=高度 蜂蜜酒 +fluid.fluid_booze_mead_extended=上头 蜂蜜酒 +fluid.fluid_booze_mead_ethereal=魔法 蜂蜜酒 +fluid.fluid_booze_mead_intoxicated=沉醉 蜂蜜酒 +fluid.fluid_booze_mead_poisoned=过发酵 蜂蜜酒 +fluid.fluid_booze_mead_hyperextended=超上头 蜂蜜酒 +fluid.fluid_booze_mead_potentextended=超高度 蜂蜜酒 diff --git a/src/main/resources/assets/growthcraft_cellar/lang/zh_cn.lang b/src/main/resources/assets/growthcraft_cellar/lang/zh_cn.lang index 01fb6bc8..ac07e165 100644 --- a/src/main/resources/assets/growthcraft_cellar/lang/zh_cn.lang +++ b/src/main/resources/assets/growthcraft_cellar/lang/zh_cn.lang @@ -24,24 +24,39 @@ fluids.tag.poisoned=毒酒 fluids.tag.potent=高度 fluids.tag.wine=葡萄酒 fluids.tag.young=低度 +fluids.tag.cream=奶油 +fluids.tag.kumis=乳酒 +fluids.tag.mash=醪糟 +fluids.tag.sake=清酒 # Items -#item.achievement_dummy.name=难以酿造? +item.achievement_dummy.name=难以酿造? item.yeast.brewers.name=酿酒酵母 -item.yeast.lager.name=窖藏啤酒酵母 +item.yeast.lager.name=啤酒酵母 item.yeast.bayanus.name=贝酵母 item.yeast.ethereal.name=乙醇酵母 -item.yeast.origin.name=原酵母 +item.yeast.origin.name=基础酵母 +item.cork_bark.name=软木皮 +item.brew_kettle_lid.name=酿壶盖 +item.barrel_tap.name=酒桶龙头 # Gui container.brew_kettle=酿造锅 container.grc.fermentBarrel=发酵桶 container.grc.fruitPress=榨汁机 +container.growthcraft.brewKettle=Brew Kettle +container.grc.CultureJar=培养罐 +gui.grc.discard=丢弃 +gui.grc.cantferment=无法发酵 +gui.grc.switch=换缸 # Tile Entities tile.brew_kettle.name=酿造锅 -tile.cork_log.name=Cork Wood +tile.cork_log.name=软木 tile.culture_jar.name=发酵罐 tile.ferment_barrel.name=发酵桶 tile.fruit_press.name=榨汁机 +tile.cork_leaves.name=软木叶 +tile.cork_log_stripped.name=软木(剥皮) +tile.cork_sapling.name=软木树苗 diff --git a/src/main/resources/assets/growthcraft_fishtrap/lang/zh_cn.lang b/src/main/resources/assets/growthcraft_fishtrap/lang/zh_cn.lang index 485e5bfd..45b66c01 100644 --- a/src/main/resources/assets/growthcraft_fishtrap/lang/zh_cn.lang +++ b/src/main/resources/assets/growthcraft_fishtrap/lang/zh_cn.lang @@ -1,3 +1,12 @@ container.fishtrap=渔栅 tile.fishtrap.name=渔栅 +tile.fishtrap_oak.name=渔栅 +tile.fishtrap_birch.name=渔栅 +tile.fishtrap_acacia.name=渔栅 +tile.fishtrap_jungle.name=渔栅 +tile.fishtrap_spruce.name=渔栅 +tile.fishtrap_darkoak.name=渔栅 + +tile.fishtrap_bamboo.name=渔栅 +tile.fishtrap_apple.name=渔栅 diff --git a/src/main/resources/assets/growthcraft_grapes/lang/zh_cn.lang b/src/main/resources/assets/growthcraft_grapes/lang/zh_cn.lang index 5e150cf5..a0185052 100644 --- a/src/main/resources/assets/growthcraft_grapes/lang/zh_cn.lang +++ b/src/main/resources/assets/growthcraft_grapes/lang/zh_cn.lang @@ -12,28 +12,28 @@ tile.grape_vine_fruit.name=葡萄藤 # Fluids fluid.fluid_booze_purple_juice=紫葡萄汁 -fluid.fluid_booze_purple_wine=紫葡萄酒 -fluid.fluid_booze_purple_wine_potent=紫葡萄酒 -fluid.fluid_booze_purple_wine_extended=紫葡萄酒 -fluid.fluid_booze_purple_ambrosia=仙馔密酒 -fluid.fluid_booze_purple_portwine=波特酒 -fluid.fluid_booze_purple_wine_intoxicated=紫葡萄酒 -fluid.fluid_booze_purple_wine_poisoned=紫葡萄酒 +fluid.fluid_booze_purple_wine=低度 紫葡萄酒 +fluid.fluid_booze_purple_wine_potent=高度 紫葡萄酒 +fluid.fluid_booze_purple_wine_extended=上头 紫葡萄酒 +fluid.fluid_booze_purple_ambrosia=紫葡萄仙馔密酒 +fluid.fluid_booze_purple_portwine=紫葡萄波特酒 +fluid.fluid_booze_purple_wine_intoxicated=沉醉 紫葡萄酒 +fluid.fluid_booze_purple_wine_poisoned=过发酵 紫葡萄酒 fluid.fluid_booze_red_juice=红葡萄汁 -fluid.fluid_booze_red_wine=红葡萄酒 -fluid.fluid_booze_red_wine_potent=红葡萄酒 -fluid.fluid_booze_red_wine_extended=红葡萄酒 -fluid.fluid_booze_red_ambrosia=仙馔密酒 -fluid.fluid_booze_red_portwine=波特酒 -fluid.fluid_booze_red_wine_intoxicated=红葡萄酒 -fluid.fluid_booze_red_wine_poisoned=红葡萄酒 +fluid.fluid_booze_red_wine=低度 红葡萄酒 +fluid.fluid_booze_red_wine_potent=高度 红葡萄酒 +fluid.fluid_booze_red_wine_extended=上头 红葡萄酒 +fluid.fluid_booze_red_ambrosia=红葡萄仙馔密酒 +fluid.fluid_booze_red_portwine=红葡萄波特酒 +fluid.fluid_booze_red_wine_intoxicated=沉醉 红葡萄酒 +fluid.fluid_booze_red_wine_poisoned=过发酵 红葡萄酒 fluid.fluid_booze_green_juice=绿葡萄汁 -fluid.fluid_booze_green_wine=绿葡萄酒 -fluid.fluid_booze_green_wine_potent=绿葡萄酒 -fluid.fluid_booze_green_wine_extended=绿葡萄酒 -fluid.fluid_booze_green_ambrosia=仙馔密酒 -fluid.fluid_booze_green_portwine=波特酒 -fluid.fluid_booze_green_wine_intoxicated=绿葡萄酒 -fluid.fluid_booze_green_wine_poisoned=绿葡萄酒 +fluid.fluid_booze_green_wine=低度 绿葡萄酒 +fluid.fluid_booze_green_wine_potent=高度 绿葡萄酒 +fluid.fluid_booze_green_wine_extended=上头 绿葡萄酒 +fluid.fluid_booze_green_ambrosia=绿葡萄仙馔密酒 +fluid.fluid_booze_green_portwine=绿葡萄波特酒 +fluid.fluid_booze_green_wine_intoxicated=沉醉 绿葡萄酒 +fluid.fluid_booze_green_wine_poisoned=过发酵 绿葡萄酒 diff --git a/src/main/resources/assets/growthcraft_hops/lang/zh_cn.lang b/src/main/resources/assets/growthcraft_hops/lang/zh_cn.lang index e9a16712..7d5b4867 100644 --- a/src/main/resources/assets/growthcraft_hops/lang/zh_cn.lang +++ b/src/main/resources/assets/growthcraft_hops/lang/zh_cn.lang @@ -23,3 +23,5 @@ fluid.fluid_booze_lager_young=拉格啤酒 fluid.fluid_booze_lager_hyperextended=拉格啤酒 fluid.fluid_booze_lager_intoxicated=拉格啤酒 fluid.fluid_booze_lager_poisoned=拉格啤酒 +fluid.fluid_booze_lager_potentextended=拉格啤酒 +fluid.fluid_booze_lager_magical=拉格魔酒 diff --git a/src/main/resources/assets/growthcraft_milk/lang/zh_cn.lang b/src/main/resources/assets/growthcraft_milk/lang/zh_cn.lang index 4be3a3ae..3c7f5461 100644 --- a/src/main/resources/assets/growthcraft_milk/lang/zh_cn.lang +++ b/src/main/resources/assets/growthcraft_milk/lang/zh_cn.lang @@ -1,8 +1,28 @@ - # Fluids fluid.fluid_butter_milk=酪乳 +fluid.fluid_booze_kumis_fermented=发酵 奶酒 +fluid.fluid_booze_kumis_potent=高度 奶酒 +fluid.fluid_booze_kumis_extended=上头 奶酒 +fluid.fluid_booze_kumis_hyperextended=超上头 奶酒 +fluid.fluid_booze_kumis_potent_extended=超高度 奶酒 +fluid.fluid_booze_kumis_potent_hyperextended=特高度 奶酒 +fluid.fluid_booze_kumis_poisoned=过发酵 奶酒 + +fluid.fluid_booze_kumis_kumis_fermented=发酵 奶酒 +fluid.fluid_booze_kumis_kumis_potent=高度 奶酒 +fluid.fluid_booze_kumis_kumis_extended=上头 奶酒 +fluid.fluid_booze_kumis_kumis_hyperextended=超上头 奶酒 +fluid.fluid_booze_kumis_kumis_potent_extended=超高度 奶酒 +fluid.fluid_booze_kumis_kumis_potent_hyperextended=特高度 奶酒 +fluid.fluid_booze_kumis_kumis_poisoned=过发酵 奶酒 + + +fluid.fluid_cheese_cazu_marzu=卡组马祖奶酪 +fluid.fluid_cheese_gouda=豪达奶酪 +fluid.fluid_cheese_provolone=普罗沃隆奶酪 + fluid.fluid_cheese_asiago=艾斯阿格奶酪 fluid.fluid_cheese_gorgonzola=古冈左拉奶酪 fluid.fluid_cheese_appenzeller=阿彭策尔奶酪 @@ -15,9 +35,10 @@ fluid.fluid_cheese_ricotta=里科塔奶酪 fluid.fluid_cream=奶油 fluid.fluid_milk=牛奶 -fluid.fluid_milk_curds=凝乳 +fluid.fluid_milk_curds=炼乳 -fluid.fluid_rennet=凝乳酶 +fluid.fluid_rennet=炼乳酶 +fluid.tags.rennet=炼乳酶 fluid.fluid_skim_milk=脱脂奶 fluid.fluid_whey=乳清 @@ -27,24 +48,33 @@ fluid.fluid_condensed_milk=巴氏奶 item.bottlefluid_milk.name=牛奶瓶 item.bottlefluid_butter_milk.name=酪乳瓶 item.bottlefluid_cream.name=奶油瓶 -item.bottlefluid_milk_curds.name=凝乳瓶 -item.bottlefluid_rennet.name=凝乳酶瓶 +item.bottlefluid_milk_curds.name=炼乳瓶 +item.bottlefluid_rennet.name=炼乳酶瓶 item.bottlefluid_skim_milk.name=脱脂奶瓶 item.bottlefluid_whey.name=乳清瓶 item.bottlefluid_condensed_milk.name=巴氏奶瓶 +item.knife.name=起司刀 +item.starter_culture.name=发酵剂 +item.stomach.name=胃 +item.cheese_cloth.name=奶酪纱布 +item.thistle.name=蓟 +item.thistle_seed.name=蓟种子 item.butter.salted.name=咸黄油 item.butter.unsalted.name=黄油 +item.cheese_waxed_slice.gouda.name=小块豪达奶酪 +item.cheese_waxed_slice.provolone.name=小块普罗沃隆奶酪 +item.cheese_waxed_slice.cheddar.name=小块切达奶酪 +item.cheese_waxed_slice.monterey.name=小块蒙特瑞奶酪 + item.cheese_aged_slice.gorgonzola.name=小块古冈左拉奶酪 +item.cheese_aged_slice.casu_marzu.name=小块卡组马祖奶酪 item.cheese_aged_slice.emmentaler.name=小块瑞士奶酪 item.cheese_aged_slice.appenzeller.name=小块阿彭策尔奶酪 item.cheese_aged_slice.asiago.name=小块艾斯阿格奶酪 item.cheese_aged_slice.parmesan.name=小块帕马森奶酪 -item.cheese_waxed_slice.cheddar.name=小块切达奶酪 -item.cheese_waxed_slice.monterey.name=小块蒙特瑞奶酪 item.cheese_simple_slice.ricotta.name=小块里科塔奶酪 -item.cheese_cloth.name=奶酪纱布 item.ice_cream.apple.name=苹果冰淇淋 item.ice_cream.chocolate.name=巧克力冰淇淋 @@ -52,12 +82,7 @@ item.ice_cream.grape.name=葡萄冰淇淋 item.ice_cream.honey.name=蜂蜜冰淇淋 item.ice_cream.plain.name=原味冰淇淋 item.ice_cream.watermelon.name=西瓜冰淇淋 - -item.starter_culture.name=发酵剂 -item.stomach.name=胃 - -item.thistle.name=蓟 -item.thistle_seed.name=蓟种子 +item.ice_cream.grape_purple.name=紫葡萄冰淇淋 item.yogurt.apple.name=苹果酸奶 item.yogurt.chocolate.name=巧克力酸奶 @@ -65,33 +90,75 @@ item.yogurt.grape.name=葡萄酸奶 item.yogurt.honey.name=蜂蜜酸奶 item.yogurt.plain.name=原味酸奶 item.yogurt.watermelon.name=西瓜酸奶 +item.yogurt.grape_purple.name=紫葡萄酸奶 # Tiles (blocks) -tile.cheese_aged.gorgonzola.unaged.name=古冈左拉奶酪 -tile.cheese_aged.emmentaler.unaged.name=瑞士奶酪 -tile.cheese_aged.appenzeller.unaged.name=阿彭策尔奶酪 -tile.cheese_aged.asiago.unaged.name=艾斯阿格奶酪 -tile.cheese_aged.parmesan.unaged.name=帕马森奶酪 - -tile.cheese_waxed.cheddar.unaged.name=切达奶酪 -tile.cheese_waxed.cheddar.unwaxed.name=切达奶酪 -tile.cheese_waxed.monterey.unwaxed.name=蒙特瑞奶酪 - -tile.curds_aged.gorgonzola.name=古冈左拉奶酪凝乳 -tile.curds_aged.emmentaler.name=瑞士奶酪凝乳 -tile.curds_aged.appenzeller.name=阿彭策尔奶酪凝乳 -tile.curds_aged.asiago.name=艾斯阿格奶酪凝乳 -tile.curds_aged.parmesan.name=帕马森奶酪凝乳 - -tile.curds_simple.ricotta.name=里科塔奶酪凝乳 - -tile.curds_waxed.cheddar.name=切达奶酪凝乳 -tile.curds_waxed.monterey.name=蒙特瑞奶酪凝乳 +tile.cheese_aged.gorgonzola.unaged.name=古冈左拉奶酪 (新鲜) +tile.cheese_aged.gorgonzola.aged.name=古冈左拉奶酪 (陈年) +tile.cheese_aged.gorgonzola.cut.name=古冈左拉奶酪 (陈年) +tile.cheese_aged.emmentaler.unaged.name=瑞士奶酪 (新鲜) +tile.cheese_aged.emmentaler.aged.name=瑞士奶酪 (陈年) +tile.cheese_aged.emmentaler.cut.name=瑞士奶酪 (陈年) +tile.cheese_aged.appenzeller.unaged.name=阿彭策尔奶酪 (新鲜) +tile.cheese_aged.appenzeller.aged.name=阿彭策尔奶酪 (陈年) +tile.cheese_aged.appenzeller.cut.name=阿彭策尔奶酪 (陈年) +tile.cheese_aged.asiago.unaged.name=艾斯阿格奶酪 (新鲜) +tile.cheese_aged.asiago.aged.name=艾斯阿格奶酪 (陈年) +tile.cheese_aged.asiago.cut.name=艾斯阿格奶酪 (陈年) +tile.cheese_aged.parmesan.unaged.name=帕马森奶酪 (新鲜) +tile.cheese_aged.parmesan.aged.name=帕马森奶酪 (陈年) +tile.cheese_aged.parmesan.cut.name=帕马森奶酪 (陈年) +tile.cheese_aged.casu_marzu.unaged.name=卡组马祖奶酪 (新鲜) +tile.cheese_aged.casu_marzu.aged.name=卡组马祖奶酪 (陈年) +tile.cheese_aged.casu_marzu.cut.name=卡组马祖奶酪 (陈年) + +tile.cheese_waxed.cheddar.unaged.name=切达奶酪 (新鲜) +tile.cheese_waxed.cheddar.unwaxed.name=切达奶酪 (无蜡) +tile.cheese_waxed.cheddar.aged.name=切达奶酪 (陈年) +tile.cheese_waxed.cheddar.cut.name=切达奶酪 (陈年) +tile.cheese_waxed.gouda.unaged.name=豪达奶酪 (新鲜) +tile.cheese_waxed.gouda.unwaxed.name=豪达奶酪 (无蜡) +tile.cheese_waxed.gouda.aged.name=豪达奶酪 (陈年) +tile.cheese_waxed.gouda.cut.name=豪达奶酪 (陈年) +tile.cheese_waxed.monterey.unaged.name=蒙特瑞奶酪 (新鲜) +tile.cheese_waxed.monterey.unwaxed.name=蒙特瑞奶酪 (无蜡) +tile.cheese_waxed.monterey.aged.name=蒙特瑞奶酪 (陈年) +tile.cheese_waxed.monterey.cut.name=蒙特瑞奶酪 (陈年) +tile.cheese_waxed.provolone.unaged.name=普罗沃隆奶酪 (新鲜) +tile.cheese_waxed.provolone.aged.name=普罗沃隆奶酪 (陈年) +tile.cheese_waxed.provolone.unwaxed.name=普罗沃隆奶酪 (无蜡) +tile.cheese_waxed.provolone.cut.name=普罗沃隆奶酪 (陈年) + + +tile.curds_aged.gorgonzola.name=古冈左拉奶酪炼乳 +tile.curds_aged.gorgonzola.dried.name=古冈左拉奶酪炼乳 (无水) +tile.curds_aged.emmentaler.name=瑞士奶酪炼乳 +tile.curds_aged.emmentaler.dried.name=瑞士奶酪炼乳 (无水) +tile.curds_aged.appenzeller.name=阿彭策尔奶酪炼乳 +tile.curds_aged.appenzeller.dried.name=阿彭策尔奶酪炼乳 (无水) +tile.curds_aged.asiago.name=艾斯阿格奶酪炼乳 +tile.curds_aged.asiago.dried.name=艾斯阿格奶酪炼乳 (无水) +tile.curds_aged.parmesan.name=帕马森奶酪炼乳 +tile.curds_aged.parmesan.dried.name=帕马森奶酪炼乳 (无水) +tile.curds_aged.casu_marzu.name=卡组马祖奶酪炼乳 +tile.curds_aged.casu_marzu.dried.name=卡组马祖奶酪炼乳 (无水) + +tile.curds_waxed.cheddar.name=切达奶酪炼乳 +tile.curds_waxed.cheddar.dried.name=切达奶酪炼乳 (无水) +tile.curds_waxed.monterey.name=蒙特瑞奶酪炼乳 +tile.curds_waxed.monterey.dried.name=蒙特瑞奶酪炼乳 (无水) +tile.curds_waxed.gouda.name=豪达奶酪炼乳 +tile.curds_waxed.gouda.dried.name=豪达奶酪炼乳 (无水) +tile.curds_waxed.provolone.name=普罗沃隆奶酪炼乳 +tile.curds_waxed.provolone.dried.name=普罗沃隆奶酪炼乳 (无水) + +tile.curds_simple.ricotta.name=里科塔奶酪炼乳 +tile.curds_simple.ricotta.dried.name=里科塔奶酪炼乳 (无水) tile.cheese_press.name=奶酪挤压器 tile.cheese_vat.name=奶酪缸 tile.churn.name=搅乳器 tile.milk.name=牛奶 -#tile.pancheon.name=Pancheon -tile.rennet.name=凝乳酶 +tile.pancheon.name=沉淀盘 +tile.rennet.name=炼乳酶 tile.thistle.name=蓟 diff --git a/src/main/resources/assets/growthcraft_rice/lang/zh_cn.lang b/src/main/resources/assets/growthcraft_rice/lang/zh_cn.lang new file mode 100644 index 00000000..6f5390d9 --- /dev/null +++ b/src/main/resources/assets/growthcraft_rice/lang/zh_cn.lang @@ -0,0 +1,21 @@ +fluid.fluid_booze_sake_water=米汁 +fluid.fluid_booze_sake_mash=米醪糟 +fluid.fluid_booze_sake_fermented=清酒 +fluid.fluid_booze_sake_potent=清酒 +fluid.fluid_booze_sake_potent_extended=清酒 +fluid.fluid_booze_sake_potent_hyperextended=清酒 +fluid.fluid_booze_sake_extended=清酒 +fluid.fluid_booze_sake_hyperextended=清酒 +fluid.fluid_booze_sake_intoxicated=清酒 +fluid.fluid_booze_sake_poisoned=清酒 +fluid.fluid_booze_sake_magical=魔法清酒 + +grc.tooltip.detailed_information= + +item.rice_cooked.name=熟米 +item.rice.name=水稻 +item.rice_ball.name=米饭团团 +item.cultivator.name=耕作机 + +tile.ricePaddy.name=稻田 +tile.ricecrop.name=水稻