DiabolicaTrix
Forge Modder-
Posts
48 -
Joined
-
Last visited
Everything posted by DiabolicaTrix
-
Don't worry, I searched before but I didn't find anything. Thanks for your reply, tho.
-
[1.8.9][SOLVED] Extended Entity Properties
DiabolicaTrix replied to DiabolicaTrix's topic in Modder Support
Ok, I tried with the Capabilities but it's doing the exact same thing, the value is saved server-side only. https://github.com/DiabolicaTrix/MinecraftLifeRPG/blob/master/src/main/java/me/diabolicatrix/other/PlayerCapabilities.java -
[1.8.9][SOLVED] Extended Entity Properties
DiabolicaTrix replied to DiabolicaTrix's topic in Modder Support
@diesieben07 No it's not, I want the EEP to be synced with the client @Choonster Oh, I didn't know, I'll give it a try. -
[1.8.9][SOLVED] Extended Entity Properties
DiabolicaTrix replied to DiabolicaTrix's topic in Modder Support
Oh, I forgot, the EEP is only saved on server side. I tried to put a Sysout in my debugItem and the output is: [10:47:10] [Client thread/INFO] [sTDOUT]: [me.diabolicatrix.items.ItemDebug:onItemUse:49]: 0 ! [10:47:10] [server thread/INFO] [sTDOUT]: [me.diabolicatrix.items.ItemDebug:onItemUse:49]: 2 ! and here is my onPlayerClone event: @SubscribeEvent public void onPlayerClone(PlayerEvent.Clone event) { if(event.wasDeath) { NBTTagCompound compound = new NBTTagCompound(); PlayerEEP.get(event.original).saveNBTData(compound); PlayerEEP.get(event.entityPlayer).loadNBTData(compound); } } -
Hi, I made an Extended Entity Properties because I want to save some data but when the player dies, the data is not saved and I don't know why. Code: https://www.github.com/DiabolicaTrix/MinecraftLifeRPG
-
Yes, by static I mean non-moving, but I want my entity to be able to move when I want to so it can't be a block. It's hard to explain but I found a mod that is doing the same thing I want: Custom NPC. The problem is that the mod is not open source.
-
Up
-
Sorry, UP
-
I don't want to make the npc follow the player with its head. I want to make a static npc so when the playe spawns it the npc is facing him and that's it. I tried gummby8 solution but it works only for west and east direction. It's a little bit weird for the 2 other directions: North: The entity face me when I spawn it and rotate back. South: The entity face the south direction when it spawn. My code: @Override public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) { if(!worldIn.isRemote) { EntityTrader trader = new EntityTrader(worldIn); pos = pos.offset(side); float yaw = playerIn.getRotationYawHead() * -1; System.out.println(playerIn.getRotationYawHead()); trader.setPositionAndRotation( (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, yaw, 0.0f); trader.rotationYawHead = yaw; trader.renderYawOffset = yaw; worldIn.spawnEntityInWorld(trader); trader.moveEntityWithHeading(0.0f, 0.5f); trader.moveEntityWithHeading(0.0f, -0.5f); } return true; }
-
Is there a function to update the entity manually?
-
HELP PLEASE! FORGE DOWNLOAD ERROR THING.
DiabolicaTrix replied to Guntuner's topic in Support & Bug Reports
http://www.winhelponline.com/blog/exe-file-association-windows-7-vista/ -
HELP PLEASE! FORGE DOWNLOAD ERROR THING.
DiabolicaTrix replied to Guntuner's topic in Support & Bug Reports
Right-click on the file, properties, and set the default application to windows executable or something like that -
HELP PLEASE! FORGE DOWNLOAD ERROR THING.
DiabolicaTrix replied to Guntuner's topic in Support & Bug Reports
Maybe you are opening the exe file with wordpad -
HELP PLEASE! FORGE DOWNLOAD ERROR THING.
DiabolicaTrix replied to Guntuner's topic in Support & Bug Reports
Can you explain your problem a little better? -
Hi, I create a static entity which is supposed to be facing the player who spawn it. I tries pretty much every function related to rotation but nothing worked. My actual code: [embed=425,349] @Override public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) { if(!worldIn.isRemote) { EntityTrader trader = new EntityTrader(worldIn); trader.setPositionAndUpdate(pos.getX(), pos.getY() + 1, pos.getZ(), playerIn.rotationYaw, playerIn.rotationPitch); worldIn.spawnEntityInWorld(trader); } return true; }[/embed] Entity: [embed=425,349]package me.diabolicatrix.entities; import me.diabolicatrix.other.TraderEEP; import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.monster.EntityGolem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.world.World; public class EntityTrader extends EntityLiving { public EntityTrader(World world) { super(world); DataWatcher dw = this.getDataWatcher(); dw.addObject(20, "default"); this.registerExtendedProperties(LifeTraderEEP.EXT_PROP_NAME, new TraderEEP()); } @Override public boolean isEntityInvulnerable(DamageSource source) { return true; } @Override protected boolean interact(EntityPlayer player) { DataWatcher dw = this.getDataWatcher(); System.out.println(dw.getWatchableObjectString(20)); return true; } public void writeEntityToNBT(NBTTagCompound nbt) { super.writeEntityToNBT(nbt); DataWatcher dw = this.getDataWatcher(); nbt.setString("Texture", dw.getWatchableObjectString(20)); } public void readEntityFromNBT(NBTTagCompound nbt) { super.readEntityFromNBT(nbt); DataWatcher dw = this.getDataWatcher(); dw.updateObject(20, nbt.getString("Texture")); } } [/embed]
-
[1.7.10] Communicating between Bukkit and Forge
DiabolicaTrix replied to starwarsmace's topic in User Submitted Tutorials
How can I do the oposite: forge to bukkit? -
Ok, I'll try.
-
I want players to be able to have a rp skin without changing their real skin so I need to change the skin server URL
-
I watched many tutorials but I don't see how I can do that with Java Reflection, the URL is not a private field, it's not a field. I would need to Override the method so I could change the URL.
-
Do you know a good tutorial for Java Reflection?
-
Hi, I wanna know how to make a skin server, well I need to know how to make it. Do I need to make a CoreMod for that? Else, how can I make it with forge? *Sorry for my BAD english*