Jump 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.

GotoLink

Members
  • Joined

  • Last visited

Everything posted by GotoLink

  1. You mixed up client and server side, but the idea is here.
  2. I would recommend using NBT. 3. You must do the packets. But it should be the server to decide the changes, and send them to client afterwards.
  3. Exactly like you would for a TileEntity.
  4. Did you read what i said ? Anyway, you would end up with the exact same issue. Your parent constructor gets called first, finish his job, and then your child class setters would try something. You need that base value in your parent class. Then use AttributeModifier_s.
  5. How are you going to use that addInformation method ? Anyway, here is how I would do it: //Inside of the event if (weapon.getItem() instanceof ImmortalAdaptingBlade){ if (event.entityLiving instanceof EntityZombie) { int dmg = 0; if(weapon.hasTagCompound && weapon.stackTagCompound.hasKey("Zombie") { dmg = weapon.getTagCompound.getShort("Zombie"); } else { NBTTagCompound tag = new NBTTagCompound(); tag.setShort("Zombie", 0); weapon.setTagCompoung(tag); } event.ammount =+ dmg; weapon.getTagCompound.setShort("Zombie",dmg+1); }}
  6. Hi, Your value default to 0, probably. The parent class constructor is called first, and func_110147_ax() is only called in EntityLivingBase constructor. Which means you have to set a base value. The SharedMonsterAttributes can be pretty huge actually. The max values are commonly Double.MAX_VALUE.
  7. Where is the code where you get the entity id from server side ? Do you check that you are on server side ?
  8. They are all square...but some parts are transparent.
  9. @Override public World getWorld() { return null; } What are you doing ?
  10. There are multiple dimensions, each being a world. (and there is the server too) Use world.provider to identify them.
  11. The ItemStack NBT is called stackTagCompound. There are methods for it in ItemStack.
  12. Vanilla drawTexturedModalRect only support squares.
  13. Search the server side world...maybe in MinecraftServer class ?
  14. Well, abstract classes can't be instanciated. It is their main property. This doesn't make any sense. You can also do both or neither. One of my personal rules is: "Optimize a working code, not the other way around"
  15. Yes, since you spawn entities on server side, the client side entity is only default. But since most data is only handled server side, it doesn't matter. You'll need packets for client side to use some values.
  16. Constructor is the "hint". That word is basic Java, i am afraid. Show your entity code anyway.
  17. There are "icon" methods in Block, look for that. Recipes are in the CraftingManager class.
  18. GotoLink replied to ss7's topic in Modder Support
    ... This is your code. You are the only one to know what changes you made and when.
  19. Man you don't need to do both
  20. *facepalm* Why not use ModelHorse directly ? :'( Your error comes from your entity constructors. It is expected to have a constructor with (World) as only argument.
  21. You can do that with a texture pack.
  22. There is only one method dealing with entities in BlockPressurePlate. getPlateState(args)
  23. Store the "Zombie" value inside the item, with the ItemStack NBT.
  24. entityPlayer.getEntityData().getCompoundTag("PlayerPersisted"); Extend WorldSaveData and use the NBT methods
  25. GotoLink replied to ss7's topic in Modder Support
    No, only when the data needed to render has changed. Yes, the packet code you showed earlier should be enough.

Important Information

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

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.