Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/28/17 in all areas

  1. 1. There is no reason to have the EFFECTIVE_ON array, setHarvestLevel() is sufficient. 2. You need to use a different constructor, the one that takes 2 floats, because vanilla wants the damage and speed values from the material passed to that constructor, but your material doesn't exist in its enum array, so it crashes. 3. Don't set the unlocalized name like that, you should use setUnlocalizedName(getRegistryName()) after you give the item a registry name, this allows your lang file to not conflict with other mods
    1 point
  2. Well, it seems to be in the right place now. What forge version are you using? In my 1.11.2 workspace, the annotation is at net.minecraftforge.fml.common.SidedProxy - can you find it?
    1 point
  3. That means the method signature doesn't match the one in the superclass. Take a look in the Item class (net.minecraft.item.Item) and search for "onItemRightClick", and make sure you have exactly the same parameters and return type. The parameters and return type changed around a lot in the last few minecraft versions, so if you've looked at a different version it probably won't match.
    1 point
  4. For an item you've coded, it's easier to override the onItemRightClick method in your item class. Otherwise you can use PlayerInteractEvent.RightClickItem. I don't know if there's a place in the docs website with all the events, but the event classes in the code have doc comments explaining how and when they are called.
    1 point
  5. There are various events and methods used in different situations. What particular case do you want to use? E.g. using an item, right-clicking a block, interacting with an entity? Is it with something you control (i.e. you added the code in your own mod), or not (i.e. something from vanilla or another mod)? In general, you can look through events in the net.minecraftforge.events package - most of them have good documentation and you can also use your IDE to find the places where a particular event is used.
    1 point
  6. if it's a "normal" item (ie. you would expect the game to receive just a 2d texture and do the same thing it does with vanilla items), you should not specify rotation, scale and translation. if it's not a "normal" item (which it probably isn't), there are two things to do: 1) use itemtransformhelper to get correct values for displaying the item (left/right hand, 1st/3rd person, on the ground, in inventory screens...), and 2) buy grey ghost a beer. https://github.com/TheGreyGhost/ItemTransformHelper http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2342078-item-transform-helper-interactively-rotate-scale
    1 point
  7. Some people still offer support for 1.7.10 on the Minecraft Forum Modification Development section. I browse that section, but I don't help people with 1.7.10 problems. I strongly recommend updating to 1.11.2/1.12.
    1 point
  8. Well your miners_portal field you are accessing is defined as a Block. and Block indeed has no trySpawnPortal method defined. Either define your fiield as a BlockMinersPortal or cast miners_portal to BlockMinersPortal before accessing it's methods.
    1 point
  9. In your render factory (the RenderRock.Factory subclass), in it's method return a new instance of RenderSnowball(new RenderSnowball). It's constructor takes 3 parameters. 1. a RenderManager. You already have one(it is the only parameter of the createRenderFor method) 2. an Item. That is the item you want the texture of to render. In your case it is your Rock item if you have one. I do not know where do you keep your item references so I can't give you a code snippet to use. 3. a RenderItem. You can obtain one using Minecraft.getMinecraft().getRenderItem(). If you want your item to render as a snowball but with a different texture you might aswell use snowball's renderer instead of writing your own.
    1 point
×
×
  • Create New...

Important Information

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