Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

King_of_Mines1

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by King_of_Mines1

  1. Im calling the genInit() method in my main class @EventHandler public void init(FMLInitializationEvent event) { Utils.getLogger().info("Initialize"); OreDictionaryHandler.registerOreDictionary(); RecipeHandler.registerCraftingRecipes(); RecipeHandler.registerSmeltingRecipes(); proxy.genInit(); }
  2. I am trying to make a world generator for one of my blocks but it isn't generating anything. World Gen Class: package me.kingofmines1.testmod.worldgen; import java.util.Random; import me.kingofmines1.testmod.init.ModBlocks; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.fml.common.IWorldGenerator; public class FoodCrateGen implements IWorldGenerator { private WorldGenerator foodcrate_overworld; public FoodCrateGen() { foodcrate_overworld = new WorldGenMinable(ModBlocks.foodcrate.getDefaultState(), 1); } private void runGenerator(WorldGenerator generator, World world, Random rand, int chunk_X, int chunk_Z, int chancesToSpawn, int minHeight, int maxHeight) { if (minHeight < 0 || maxHeight > 256 || minHeight > maxHeight) throw new IllegalArgumentException("Illegal Height Arguments for WorldGenerator"); int heightDiff = maxHeight - minHeight + 1; for (int i = 0; i < chancesToSpawn; i ++) { int x = chunk_X * 16 + rand.nextInt(16); int y = minHeight + rand.nextInt(heightDiff); int z = chunk_Z * 16 + rand.nextInt(16); generator.generate(world, rand, new BlockPos(x, y, z)); } } @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.getDimension()) { case 0: this.runGenerator(foodcrate_overworld, world, random, chunkX, chunkZ, 100, 50, 90); } } } Server Proxy Class: package me.kingofmines1.testmod.proxy; import me.kingofmines1.testmod.util.Utils; import me.kingofmines1.testmod.worldgen.FoodCrateGen; import net.minecraftforge.fml.common.registry.GameRegistry; public class ServerProxy implements CommonProxy { @Override public void init() { } @Override public void genInit() { GameRegistry.registerWorldGenerator(new FoodCrateGen(), 0); Utils.getLogger().info("Registered Food Crate Generator"); } } Common Proxy Class: package me.kingofmines1.testmod.proxy; public interface CommonProxy { public void init(); public void genInit(); } Once I get the generator working I want to make it so that my block only spawns on top of grass on the surface.
  3. I have basic java experience. Sorry I'm having so much trouble understanding what you guys are saying. I don't understand how to make this property thing.
  4. There is a lot of age related code in that file. Do I just copy this? public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 7);
  5. do I just copy the whole file... There is a lot of code.
  6. I know I need to make a property I just don’t know how...
  7. How do I change the IProperty of the crop and how do I fix the ModelLoader thing... sorry I'm such noob :\
  8. I already have all my models registered in my client proxy: package me.kingofmines1.testmod.proxy; import me.kingofmines1.testmod.init.ModArmor; import me.kingofmines1.testmod.init.ModBlocks; import me.kingofmines1.testmod.init.ModCrops; import me.kingofmines1.testmod.init.ModItems; import me.kingofmines1.testmod.init.ModTools; public class ClientProxy implements CommonProxy { @Override public void init() { ModCrops.registerRenders(); ModTools.registerRenders(); ModBlocks.registerRenders(); ModArmor.registerRenders(); ModItems.registerRenders(); } } and I only have ages 0-2 because I don't want anymore stages. How do I stop it from looking for more stages
  9. I am having trouble getting the texture for my custom crop to work. ModCrops Class: package me.kingofmines1.testmod.init; import me.kingofmines1.testmod.Main; import me.kingofmines1.testmod.Reference; import me.kingofmines1.testmod.init.crops.CornCrop; import me.kingofmines1.testmod.util.Utils; import net.minecraft.block.Block; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModCrops { public static Block corncrop; public static void init() { corncrop = new CornCrop("corncrop", "corncrop"); } public static void register() { registerBlock(corncrop); } public static void registerRenders() { registerRender(corncrop); } public static void registerBlock(Block block) { block.setCreativeTab(Main.tab); GameRegistry.register(block); GameRegistry.register(new ItemBlock(block).setRegistryName(block.getRegistryName())); Utils.getLogger().info("Registered Block: " + block.getUnlocalizedName().substring(5)); } public static void registerRender(Block block) { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(new ResourceLocation(Reference.MODID, block.getUnlocalizedName().substring(5)), "inventory")); Utils.getLogger().info("Registered render for " + block.getUnlocalizedName().substring(5)); } } CornCrop Class: package me.kingofmines1.testmod.init.crops; import me.kingofmines1.testmod.Reference; import me.kingofmines1.testmod.init.ModItems; import net.minecraft.block.BlockCrops; import net.minecraft.item.Item; import net.minecraft.util.ResourceLocation; public class CornCrop extends BlockCrops { public CornCrop(String unlocalizedName, String registryName) { this.setUnlocalizedName(unlocalizedName); this.setRegistryName(new ResourceLocation(Reference.MODID, registryName)); } @Override protected Item getSeed() { return ModItems.cornseed; } @Override protected Item getCrop() { return ModItems.corn; } } corncrop.json: { "variants": { "age=0": { "model": "tm:corncropstage0" }, "age=1": { "model": "tm:corncropstage1" }, "age=2": { "model": "tm:corncropstage2" } } } corncropstage0.json (same for other stages): { "parent": "block/crop", "textures": { "crop": "tm:blocks/corncropstage0" } } Error: [19:38:51] [Client thread/ERROR] [FML]: Exception loading model for variant tm:corncrop#age=7 for blockstate "tm:corncrop[age=7]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model tm:corncrop#age=7 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:260) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:248) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:155) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:541) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1253) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 21 more [19:38:51] [Client thread/ERROR] [FML]: Exception loading model for variant tm:corncrop#age=6 for blockstate "tm:corncrop[age=6]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model tm:corncrop#age=6 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:260) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:248) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:155) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:541) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1253) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 21 more [19:38:51] [Client thread/ERROR] [FML]: Exception loading model for variant tm:corncrop#age=5 for blockstate "tm:corncrop[age=5]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model tm:corncrop#age=5 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:260) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:248) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:155) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:541) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1253) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 21 more [19:38:51] [Client thread/ERROR] [FML]: Exception loading model for variant tm:corncrop#age=4 for blockstate "tm:corncrop[age=4]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model tm:corncrop#age=4 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:260) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:248) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:155) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:541) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1253) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 21 more
  10. I have created a this recipe but I want to work in the player's inventory not just a crafting table since it is a 2x2 recipe. GameRegistry.addRecipe(new ItemStack(ModBlocks.condensedpoppydust), new Object[]{" ","DD ","DD ", 'D', ModItems.itempoppydust});
  11. Im about to try and follow the video you sent me. Im making mods for 1.7.10 so is there anything different I need to do when I follow the video?
  12. Its already unchecked and I still get the error.
  13. The issue is that when I try to import the project it says " Some projects cannot be imported because they already exist in the workspace" I already know a bit of java and have made a working mod. This issue is just because I am getting an error that I don't know how to fix. And I also haven't linked any outdated tutorials I'm using. I WAS linked outdated tutorials.
  14. In the link you gave me the step for getting the project says. "For Eclipse, create a workspace anywhere (though the easiest location is one level above your project folder). Then simply import your project folder as a project, everything will be done automatically." What exactly is it asking me to do here.
  15. When I get to the part that where I have to import forge when I click on the eclipse file it says "Some projects cannot be imported because they already exist in the workspace" and it won't let me click finish.
  16. Im sure this is extremely simple but for some reason I can't figure out how to do this. I have already setup the JDK, forge, and eclipse and made my first mod but I don't know how to make a new project in eclipse that has all the forge resources and stuff.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.