Everything posted by GotoLink
-
Trouble with adding chat message on interact
You mixed up client and server side, but the idea is here.
-
Changing one item into another (not metadata)
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.
-
Using WorldSavedData?
Exactly like you would for a TileEntity.
-
1.6 Entities and Attributes - My smart way wasn't so smart it seems?
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.
-
NBT stacktagcompound
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); }}
-
1.6 Entities and Attributes - My smart way wasn't so smart it seems?
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.
-
Getting entity from id on client side
Where is the code where you get the entity id from server side ? Do you check that you are on server side ?
-
Gui texture getting cut off?
They are all square...but some parts are transparent.
-
[SOLVED] Help with a custom macerator-like tile entity machine
@Override public World getWorld() { return null; } What are you doing ?
-
WorldLoad Event
There are multiple dimensions, each being a world. (and there is the server too) Use world.provider to identify them.
-
Regular Error
The ItemStack NBT is called stackTagCompound. There are methods for it in ItemStack.
-
Gui texture getting cut off?
Vanilla drawTexturedModalRect only support squares.
-
Despawn all entities and prevent any from spawning unless told so
Search the server side world...maybe in MinecraftServer class ?
-
Spawning in entity: Error
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"
-
Strange entity rendering problem
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.
-
Spawning in entity: Error
Constructor is the "hint". That word is basic Java, i am afraid. Show your entity code anyway.
-
Vanilla block behavoir
There are "icon" methods in Block, look for that. Recipes are in the CraftingManager class.
-
NBT not saving
... This is your code. You are the only one to know what changes you made and when.
-
Saving data externally without NBT?
Man you don't need to do both
-
Spawning in entity: Error
*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.
-
Vanilla block behavoir
You can do that with a texture pack.
-
help pressure plate
There is only one method dealing with entities in BlockPressurePlate. getPlateState(args)
-
Regular Error
Store the "Zombie" value inside the item, with the ItemStack NBT.
-
Saving data externally without NBT?
entityPlayer.getEntityData().getCompoundTag("PlayerPersisted"); Extend WorldSaveData and use the NBT methods
-
NBT not saving
No, only when the data needed to render has changed. Yes, the packet code you showed earlier should be enough.
IPS spam blocked by CleanTalk.