Jump to content

brandon3055

Forge Modder
  • Posts

    444
  • Joined

  • Last visited

Everything posted by brandon3055

  1. I think for the armor you would have to disable the default model and use RenderPlayerEvent to render your custom model.
  2. Which iterates through the inventory, but you are right, one does not have to do so manually. Yea thats what i meant you don't have to do it yourself because there is a method that dose it for you.
  3. You dont actually have to iterate through the players inventory yourself there is already a method for that player.inventory.hasItemStack(stack) or player.inventory.hasItem(item)
  4. the best way to do this is using PlayerTickEvent to check if the player has the item in their inventory and if so allow them to fly. One thing to keep in mind is that a lot of other mods allow flying the same way so be sure not to break them. By that i mean if you were to just set hasFlight to false every tick if the player dose not have the item that would break other mods.
  5. Pro tip when someone says to override method x dont just blindly create a method called x and expect it to work because in most cases it wont (unless you are given the full method) Look it up in the super class and override it properly. You should be able to just type the first few letters of the method and your ide will give you a list of methods to override.
  6. Then it is a problem with your getIcon methods you need to return a different icon for each side depending on the metadata.
  7. Try removing that altogether you really only need to worry about onBlockPlacedBy. Also a good way to check that the metadata is actuallly being set is to put a Sysout in onBlockActivated that prints out the metadata.
  8. You cant store data in your item class you need to use NBT for that.
  9. 1.7.2 and 1.7.10 are almost identical you should be able to update with very few if any changes to your code. But you will make up for it when you update to 1.8...
  10. Whats this? b1.func_149730_j() && !b2.func_149730_j() Thats like saying if (true && false) It will always return false.
  11. As long as it is in a loaded chunk updateEntity should always be called every tick. Is it in a loaded chunk?
  12. Its probably because they are expecting to be placed by a player and even if they arnt the code to update the rotation is still called.
  13. Take a look at how the furnace works. That uses meta data to determine which sides have what textures and when placed it uses the players facing direction to set the metadata.
  14. This dose not sound like a modding issue. I think you are in the wrong place (this board is for mod developers)
  15. I was referring to the way you named your block instances in your ModBlocks class e.g. "FireColoredBlack" should be "fireColoredBlack" Also giving your fire block a bounding box would make things simpler but i think fire with a bounding box would be a bit weird. It wont take much to get the code i gave you yo work properly. Here is another really big hint ForgeDirection face = ForgeDirection.getOrientation(event.face); int x = event.x + face.offsetX; int y = event.y + face.offsetY; int z = event.z + face.offsetZ; System.out.println(event.world.getBlock(x, y, z));
  16. To learn about proxies i recommend you check out pahimars tutorial on them. http://www.pahimar.com/tutorials/lets-mod/ Edit: Here is a simple mod i use for testing that has proxies setup https://github.com/brandon3055/Reference-Mod
  17. Yes that may help but did you check that com.shaharcoolmen.randcommands.proxy.CommonProxy is correct?
  18. I Think you did it all wrong. In your main project directory create a folder called "libs" and put the mod jar in that that will allow your mod to compile. Then you need to add the jar to your ide as a library but i only know how to do that in idea. For idea go to project structure > Libraries > New project library then navigate to the jar you placed in libs and select it. If you are using eclipse its probably something similar. Also the thing about dependencies is you kind of depend on them for your mod to work. So if you are making a mod that uses another mod as a library you are going to need that other mod installed for it to work.
  19. I believe if you have an item renderer registered for your item the game will try to use that for ALL rendering of that item so even if you havent specified how it should render in your inventory it will still try to use your item renderer. But im not 100% sure about that. Edit: Try returning false in handleRenderType if type == inventory.
  20. Hmm... That all looks correct try adding a System.out to the event handler to to check that it is actually getting called. Also maby rename your event handler class because there are a lot of classes called EventHandler. Edit: Have you done anything to your block to make it possible to actually hit it? When you try to hit fire (including my custom fire block) you actually hit the block under/behind it because fire has no selection bounding box. The way the code i gave you works is it detects when a player left clicks a block (any block) and checks if the block above that block is your fire block if so it sets the block above the block you clicked to air. Edit2: Looking at your code it looks like FireColoredBase is your base block and all of the actual blocks that exist in world extend that? If that is true event.world.getBlock(event.x, event.y + 1, event.z) == ModBlocks.FireColoredBase will never return true because FireColoredBase dosnt actually exist in world. To fix that use instanceof FireColoredBase instead of == ModBlocks.FireColoredBase Edit3: Assuming that BlockFireColoredBase is a base class that you dont want to exist in game you should not have an instance of it in your ModBlocks class the isBurning override should be in the class itself and it should not be registered. (But thats assuming you dont want it registered in game) One last thing... Look into java naming convention http://www.oracle.com/technetwork/java/codeconventions-135099.html
  21. I just spent a bit of time messing with BiomeManager but i wasnt able to remove any vanilla biomes ether. Maby it just works for modded biomes.
  22. On the server when you receive the packet it gives you the player so you can get the container from player.openContainer. Remember to use null checks
  23. Please show your event handler class and how you are registering it.
  24. It may be possible but i think you would be better off adding your own inventory slot. Maby something like what Baubles dose.
×
×
  • Create New...

Important Information

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