Jump to content

larsgerrits

Members
  • Posts

    3462
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by larsgerrits

  1. There are a few exceptions with Minecraft blocks, like blocks and flower pots. Those blocks are places by a different Item then the ItemBlock corresponding to the Block. To account for this, you have to do things a little bit different. You need to get an ItemStack instance using Block#getPickBlock(...) . Then you can get the display name using ItemStack#getDisplayName() .
  2. No, I meant it like this: marble = new Block().whatevermethodsyouwant(); marble.setHarvestLevel(parameters);
  3. You current get the same config element twice. Only do it once in a central place. And you are now only adding the recipe when disableRFtLrecipe is true, so it is inverted.
  4. The error is pretty obvious: java.lang.ClassCastException: com.google.common.collect.HashMultimap cannot be cast to Com.gun.gun.ItemGun at Com.gun.Packet.ReloadGunPacket$Handler.onMessage(ReloadGunPacket.java:77) ~[ReloadGunPacket$Handler.class:?]
  5. You can't include setHarvestLevel in your 'chain', as that method doesn't have a Block as it's return type. You have to call setHarvestLevel after your block instantiation.
  6. One of your mods is adding entities to the world from the wrong thread. It is very hard to track down the mod that caused the error, so the best you can do is remove mods until the error stops.
  7. PopulateChunkEvent is a Forge event. You have to register it to the MinecraftForge.EVENT_BUS , but you are registering it to the FML event bus (FMLCommonHandler.instance().bus()).
  8. Whenever you get an error, post it. Without it we can't do anything usefull to help you.
  9. I see a lot of things wrong with the way you coded your mod: - You only need 1 IWorldGenerator to generate all your ores. - if (this.nether == true) Why do people do this? This works exactly the same as if(this.nether) , since the nether variable is of type boolean. - As diesieben07 said, why are the fields in your generator class static? Do you even know what static means? This explains a lot of your problems (only tungsten generating, but everywhere). - In allof your asserts, you used the wrong logical operators: < instead of >, and vice versa. The first asserts is basically: if maxY is greater than minY, say "maxY is lower than minY". - You are generating with the wrong X and Z variables in the overworld. This is what you get when you have horrible names for variables. Overall, I'm beginning to question your Java knowledge. If you don't know Java, and you are trying to learn it via Minecraft modding, I strongly advice against it. Learning Java and modding seperately will take way less time.
  10. Use Item.getItemFromBlock(Block) [/code] to get the Item value of a Block. Use that to compare the Item from the fuel ItemStack .
  11. There are 3 ways of rendering a block: the built-in block renderer, an ISimpleBlockRenderingHandler or using a TileEntitySpecialRenderer . Most blocks use the built-in block rendering. This compiles into a display list and only changes with block updates. It renders a chunk at a time. An ISimpleBlockRenderingHandler (ISBRH for short) is a way of providing custom vertices for the block, instead of the default cube vertices of the built-in renderer This allows . This also compiles into a display list and only changes with block updates. Just like the built-in renderer, it renders a chunk at a time. A TileEntitySpecialRenderer (TESR for short) is a bit different. It is a way of rendering custom models, made by Techne, Tabula or other modeling software. This also allows you to render different model formats (Wavefront (.obj) for example). A TESR is rendered every frame, but this makes it more resource intensive than a ISBRH. A TESR also allows animations in your model, which is not possible with a ISBRH. There are plenty of tutorials for both the ISBRH and TESR, and it's up to you to decide which you want to use. For simple models with only a few cubes, like a cauldron, an ISBRH is better. If you have more complex models, a TESR is better.
  12. There is the IFuelHandler interface, which you can use. Make a class implementing that interface. There's one method you have to implement in which is pretty self-explanatory. You register that class through GameRegistry.registerFuelHandler(IFuelHandler) .
  13. To be clear, FML and Forge aren't seperate projects. They used to be, but about 5 months ago they decided to merge them as nobody used FML or Forge alone.
  14. We are not going to download a random file from the internet. Host your code on GitHub, or share it with gists or pastebins. Also, punctuation please...
  15. The assets folder doesn't exist by default, so you have to make to yourself.
  16. It seems like you just answered your own question...
  17. 1) As said before, you have 2 methods with FMLInitialization as it's parameter. 2) Don't make the @EventHandler methods static. 3) That code in your ClientProxy... Why? That's just all... wrong... How could you even manage to do that? It just doesn't make any sens at all...
  18. Then there wouldn't be any log messages, since the method checks world.isRemote == false. Totally missed that... I should go to bed to rest, as I won't be of much help when I'm tired like this...
  19. From where are you calling the clearArea method? It seems like you are calling the method on the client-side only.
  20. We already told you how to do it without custom spawn eggs.
  21. You don't put resources (textures) in src/main/java, but src/main/resources (duh...).
  22. And why do you think you have to override those? There's probably another way of doing that what you wanted to do. So:
  23. For the third time: heldItem == new ItemStack(GemItems.redPoweredPick) does not work. You have to directly compare the [ttItem[/code], not the ItemStack .
  24. java.lang.NullPointerException: Rendering screen at com.camerpon900.realauto2.gui.GuiEnergyCube.drawGuiContainerBackgroundLayer(GuiEnergyCube.java:29) On line 29, there is this code: int p = this.tileEntityEnergyCube.getPowerScaled(42); The only thing that can be null is tileEntityEnergyCube . It your constructor you set that variable, but it stays null. Why? because you call the GuiEnergyCube constructor with tileEntity being null. So there is an issue with the way you initialize your GuiEnergyCube , most likely in your IGuiHandler .
  25. Two things are different: 1) You are now only doing things on the server side 2) You added a call to World#notifyBlocksOfNeighborChange , which is probably what made it work.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.