
swordkorn
Members-
Posts
86 -
Joined
-
Last visited
-
Days Won
1
Everything posted by swordkorn
-
I'm not a total idiot you know... you don't have to talk to me like one... just saying. Yes you're saying that because I'm calling on a block in the preInit yet to be created in the init it will not associate and return null. My point simply at this stage is to find a way to associate a particular block type with my item so I can manually define which block the item will place during the declaration instead of using 50 item classes to define the particular block in question.
-
Hi guys. I'm currently trying to update my mod to the latest version and as a result, I've been trying to optimise how I do things all over the place. What I want to achieve is a singular item "parent" class that holds all the necessary logic for the item, but have the block it places on item use be configurable so I can manually define that. Anybody have any suggestions as to how I could go about this? Thanks!
-
gradlew setupDecompWorkspace not working with Eclipse Mars
swordkorn replied to Eighty8keyGuru's topic in Modder Support
Reinstall Eclipse then. -
It doesn't exist. Instead, create a GitHub project for the mod and let your friend fork it. Modding teams don't all work in "one" IDE instance. They all work in individual instances, each taking one part of the work they're best at, and ultimately combining their efforts together via GitHub or something else. The idea of working in one IDE doesn't exist as your individual session IDs would make it impossible.
-
gradlew setupDecompWorkspace not working with Eclipse Mars
swordkorn replied to Eighty8keyGuru's topic in Modder Support
Re-download Forge MDK, copy those folders across and try again -
Hey guys. Out of the frying pan and into the fire! I fixed the issue with the hash code thanks to Choonster and diesieben and now I get this: java.lang.IllegalArgumentException: Cannot set property PropertyInteger{name=age, clazz=class java.lang.Integer, values=[0, 1, 2, 3, 4, 5, 6, 7]} as it does not exist in BlockStateContainer{block=null, properties=[stage]} at net.minecraft.block.state.BlockStateContainer$StateImplementation.withProperty(BlockStateContainer.java:211) at net.minecraft.block.BlockCrops.<init>(BlockCrops.java:27) at com.mysticalcrops.blocks.MysticalCropBlock.<init>(MysticalCropBlock.java:38) at com.mysticalcrops.blocks.CropBlocks.registerBlockCrop(CropBlocks.java:19) at com.mysticalcrops.blocks.CropBlocks.loadCropBlocks(CropBlocks.java:15) at com.mysticalcrops.proxy.CommonProxy.init(CommonProxy.java:18) at com.mysticalcrops.proxy.ClientProxy.init(ClientProxy.java:19) at com.mysticalcrops.MysticalCrops.init(MysticalCrops.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) My code for the block: http://pastebin.com/bF69yDT0
-
gradlew setupDecompWorkspace not working with Eclipse Mars
swordkorn replied to Eighty8keyGuru's topic in Modder Support
It'll be wherever you want it to be. My Mod for example is in C://Users/<myusername>/Desktop/<mymodname>/ All the files relevant to that mod and that mod alone reside in there. It has its own decompiled workspace and eclipse folder. All I do is copy over the necessary forge folders and gradle files. -
[1.9.4] [SOLVED] Block not registering. Mentions hash code?
swordkorn replied to swordkorn's topic in Modder Support
Removed that and got a new problem. But this issue is solved so I'll mark it as so and make a new thread if necessary. Thanks guys! -
gradlew setupDecompWorkspace not working with Eclipse Mars
swordkorn replied to Eighty8keyGuru's topic in Modder Support
Create a seperate folder for all your individual mod items (as it's good practice and you can rinse and repeat from the forge folder you unzipped) and copy just the folders and files (excluding text files) into that. In that main folder where .gradlew exists, shift right click and open your command window. run gradlew setupDecompWorkspace run gradlew eclipse Done. -
[1.9.4] [SOLVED] Block not registering. Mentions hash code?
swordkorn replied to swordkorn's topic in Modder Support
http://pastebin.com/ExBf80RQ That's the entirety of my class EDIT: Are you saying diesieben that I don't need to be overriding that method? -
[1.9.4] [SOLVED] Block not registering. Mentions hash code?
swordkorn replied to swordkorn's topic in Modder Support
I'm trying to create a universal block class that I can call for multiple plant block types. Previously I had multiple classes and it was a total mess, so I'm trying to optimise it all down into one class. -
[1.9.4] [SOLVED] Block not registering. Mentions hash code?
swordkorn replied to swordkorn's topic in Modder Support
Hi Choonster and thank you for the reply. This is where I create the HashMap I believe: public class CropItems { public static Item[] MCSeeds; public static HashMap<MysticalCropBlock, Item> seedsMap = new HashMap<MysticalCropBlock, Item>(); public static HashMap<MysticalCropBlock, Item> havestedItemMap = new HashMap<MysticalCropBlock, Item>(); And this is where I call on it: @Override public int hashCode() { return regName.hashCode(); } -
public boolean generate(World worldIn, Random rand, BlockPos position) { for (int i = 0; i < 20; ++i) { BlockPos blockpos = position.add(rand.nextInt( - rand.nextInt(, rand.nextInt(4) - rand.nextInt(4), rand.nextInt( - rand.nextInt(); if (blockpos.getX() > 0 && blockpos.getY() > 0 && blockpos.getZ() > 0 && blockpos.getY() < 255) { if (worldIn.isAirBlock(blockpos) && (!worldIn.provider.getHasNoSky()) && this.flower.canBlockStay(worldIn, blockpos, this.state)) { worldIn.setBlockState(blockpos, this.state, 2); } } } return true; } Where are you calling this method? Also, this.flower.canBlockStay(worldIn, blockpos, this.state), what is it actually looking for and in what direction?
-
gradlew setupDecompWorkspace not working with Eclipse Mars
swordkorn replied to Eighty8keyGuru's topic in Modder Support
Also, unzip the folder... -
gradlew setupDecompWorkspace not working with Eclipse Mars
swordkorn replied to Eighty8keyGuru's topic in Modder Support
If you have never decompiled your project file before, you don't need to refresh any dependencies. Also, ensure you're opening the Command Prompt from WITHIN the main folder for your mod, otherwise it won't make any of the necessary files. -
gradlew setupDecompWorkspace not working with Eclipse Mars
swordkorn replied to Eighty8keyGuru's topic in Modder Support
May I just ask why you're passing the arguments to refresh the workspace if this is the first decompilation? Also... may seem like an obvious and redundant question but always safer to ask... have you got the JDK? -
Hey guys. I'm currently working on an update of my mod to 1.9.4 and I'm trying to optimise my code a little. However; my registry fails and I get this crash log: [13:44:03] [Client thread/ERROR] [FML]: Caught exception from mysticalcrops java.lang.NullPointerException at com.mysticalcrops.blocks.MysticalCropBlock.hashCode(MysticalCropBlock.java:191) ~[bin/:?] at com.google.common.collect.HashBiMap.hash(HashBiMap.java:173) ~[guava-17.0.jar:?] at com.google.common.collect.HashBiMap.access$300(HashBiMap.java:52) ~[guava-17.0.jar:?] at com.google.common.collect.HashBiMap$Inverse.get(HashBiMap.java:508) ~[guava-17.0.jar:?] at net.minecraft.util.registry.RegistryNamespaced.getNameForObject(RegistryNamespaced.java:44) ~[forgeSrc-1.9.4-12.17.0.1960.jar:?] at net.minecraft.util.registry.RegistryNamespacedDefaultedByKey.getNameForObjectBypass(RegistryNamespacedDefaultedByKey.java:84) ~[forgeSrc-1.9.4-12.17.0.1960.jar:?] at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.getNameForObject(FMLControlledNamespacedRegistry.java:777) ~[forgeSrc-1.9.4-12.17.0.1960.jar:?] at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.getNameForObject(FMLControlledNamespacedRegistry.java:35) ~[forgeSrc-1.9.4-12.17.0.1960.jar:?] at net.minecraft.block.state.BlockStateContainer.toString(BlockStateContainer.java:157) ~[forgeSrc-1.9.4-12.17.0.1960.jar:?] Any help would be appreciated!
-
Yes I respect and gathered that from doing this revolutionary thing known as reading for myself... I simply mentioned it because I know it probably wasn't clear in the code snippets that they were in seperate classes which was my bad. The simple reason I'm using ModelBakery is the distinct lack of 1.9 method change explanations both in code and online. Therefore, I'm using it as it was what worked in 1.8.9. I will investigate the ModelLoader method you suggest. Thanks for the advice. I still have the registry problem however which is getting on my nerves purely because I can't even test to see if I've fixed the render issue until it decides to register properly.
-
Hi guys. First of all you'll have to forgive me if I'm not too up on this whole "Why we now have to use Registry" methods instead of unlocalised names (if it wasn't broken why fix it? But anyway...) I registered a block in my mod as a singular block for testing purposes and everything was fine. I have since changed its parent class to allow it to have variants and it's here I come unstuck. First issue I faced was the ModelBakery throwing a null pointer when I tried to call registerItemVariants(). Second issue is this registry problem. I've looked at the code for this and there's no way round it. My block can't be registered again despite that version of it no longer existing. Any help would be appreciated. Thanks guys! final String colours[] = { "White", "Black" }; ResourceLocation[] resLoc = new ResourceLocation[2]; for(int i = 0; i < 2; i++) resLoc = new ResourceLocation("barrels:barrel" + colours); ModelBakery.registerItemVariants(Item.getItemFromBlock(BarrelsBlocks.barrelWhite), resLoc); public static Block barrelBlock = new BarrelBlock("barrelBlock"); public static Block barrelWhite = new MetaBarrelBlock("barrelWhite"); public static void createBlocks() { GameRegistry.register(barrelBlock.setRegistryName("barrelBlock")); GameRegistry.register(barrelWhite.setRegistryName("barrelWhite")); GameRegistry.register(new BarrelsItemBlock(barrelBlock).setRegistryName(barrelBlock.getRegistryName())); GameRegistry.register(new BarrelsItemBlock(barrelWhite).setRegistryName(barrelWhite.getRegistryName())); }