Skip to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Animefan8888

Forge Modder
  • Joined

  • Last visited

Everything posted by Animefan8888

  1. Minecraft.getMinecraft().objectMouseOver; Is client side only, meaning since the server doesn't know about this it can't do it. Meaning it is reset next tick for the client.
  2. That is basically what I said, but mine included Capability instead of NBT.
  3. Runtime is not what you defined it to be. http://stackoverflow.com/questions/3900549/what-is-runtime
  4. Do you mean after postInit is done?
  5. You didn't do this part right new ModelResourceLocation(TutorialMod.modId + ":" + "inventory") // Instead do new ModelResourceLocation(item.getRegistryName()), "inventory"
  6. Post your code where you register your models.
  7. You need to write a Capability that stores if the Entity has the effect on and for how long the affect should last. Then you need to apply the effect using an event (one that is fired when something is attacked LivingAttackEvent). And another event to deal the damage (LivingUpdateEvent). And then you would also need to add the Enchantment (not sure if the registry system for enchants existed back then just creating an instance should do).
  8. Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler(blockColor, blocksIn);
  9. It uses the IBlockColor interface. Do you mean a new Block when you say variation?
  10. Scaling is just multiplying, so you need to write a method that changes the dimensions of the cubes that are in the model. And probably keep the cube centered on where it is.
  11. Quick question. Why are you using recursion? If you already know where the head is just get it that way. Hint they should be in the order that you add them under. And they should still be in the same hierarchy that you added them. And unless the addChild creates a new field then you should just be able to call scale your variable called head.
  12. Items need to be initialized in preInit not init. The problem you are facing is that you are trying to add a recipe for Items that don't exist yet. Also stop using ItemModelMesher instead use ModelLoader.setCustomModelResourceLocation
  13. Two things, did you bind the TESR, and the next being did you let the client know that there is a fluid inside of it.
  14. What do you mean by "extremely efficient" ? Regarding OpenGL code ? You should only draw to the screen when you need to. Ie you need a boolean that determines when you need to re render the item(s).
  15. Maybe scheduling a task to get the world or just the ItemStacks.
  16. As I understand it, I need to send from the server package to the player with data on strength and on the client package has to pass getStamina? Your PacketStamina needs to have two constructors one that takes in the stuff needing to be sent and one that is empty. Then in your to and from bytes methods you need to save and load the data to/from the ByteBuf in the parameters. Then in your handleClientSide method you need to set the data to where it needs to be from the PacketStamina passed in through the parameters.
  17. I swear I was once told by Diesieben there was a way to access the TE and there by the ItemStacks containing it (hasn't had to use the IBakedModel system yet). Edit: I thought of a way it could be possible. But by god it might be a pain to implement. You could make the blockstate hold the x, y, z positions, of course this might cause a problem of having way to many possible combinations in the blockstate, but never fear if applying a custom state mapper and overriding the createBlockState method to return a custom BlocKStateContainer that doesn't load a blockstate or at least throws out those Properties, that problem can be averted. And then you can access the TE from Minecraft.getMinecraft().theWorld.getTileEntity(blockPos from state) and access the inventory. Though if I remember what Diesieben said correctly then this probably is not what he was talking about.
  18. Also I don't think your Packets are Thread safe...you need to schedule a task.
  19. In your handleClientSide method you need to access the value and change it to the one you save in the toBytes method and you also need to read it from the fromBytes method.
  20. No it is not, you can use an IBakedModel and add the BakedQuads of the item you want to add to the rendering ones. This is because TESRs draw themselves to the screen every single frame. Only if they where placed close together, and not done efficiently.
  21. Ok...now that I see the AbstractPacket class I understand what he was doing, I thought it was a vanilla class. I.e., in the package there's nothing to add? Look at loordgek's post for an example of what you are doing specifically.
  22. That is not what you are supposed to do...
  23. That is explained in the link I sent you. OK, I will ask then as I through the pack to pass to the client player IStamina values? The SimpleNetworkWrapper field you created has methods for sending packets you want SimpleNetworkWrapper#sendTo(IMessage, EntityPlayer) which will send the data to the specific player. I know how to send! How send do I stamina to pass the data inside the package? new StaminaUpdateMessage(stamina);

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.