TheRealMcrafter
Forge Modder-
Posts
137 -
Joined
-
Last visited
Everything posted by TheRealMcrafter
-
[Resolved]get were the player is looking 1.7.10
TheRealMcrafter replied to BoonieQuafter-CrAfTeR's topic in Modder Support
Not to be mean, but you clearly don't understand what @Override actually does - it is simply an extra layer of error-checking within the IDE - it has no effect whatsoever on the compiled code. I'm aware of this, just pointing out that thats not where override goes. -
[Resolved]get were the player is looking 1.7.10
TheRealMcrafter replied to BoonieQuafter-CrAfTeR's topic in Modder Support
You clearly dont understand how to override a method. You need to put @Override above onItemRightClick. Also get rid of all the extra code that doesnt work. If you want to spawn it where the player is looking, why do you need to ray trace when you already use a Vec3 look vector? -
[Resolved]get were the player is looking 1.7.10
TheRealMcrafter replied to BoonieQuafter-CrAfTeR's topic in Modder Support
Override your method -
[1.8] [SOLVED] Waiting for a message to be processed
TheRealMcrafter replied to SnowyEgret's topic in Modder Support
I think what diesieben07 was implying is that you need to have some checks on the server to see if it is possible for the client to set that block, ie: distance from the block, permissions, etc. Otherwise, your mod could be open to some hacking. -
[Resolved]get were the player is looking 1.7.10
TheRealMcrafter replied to BoonieQuafter-CrAfTeR's topic in Modder Support
Vec3 look = player.getLookVec(); -
[1.8] Dropped items create ghost copies
TheRealMcrafter replied to Ferrettomato's topic in Modder Support
You are dropping the items on the server side and the client side. Do a !world.isRemote check first. -
Can you throw in a System.err.println(); to check if the addInformation method is being called?
-
You need to make a class that implements IExtendedEntityProperties, and when they player is constructed, bind an instance of that class to the player.
-
[1.7.10]Make Mob not attack itself
TheRealMcrafter replied to BoonieQuafter-CrAfTeR's topic in Modder Support
Can you please post the AI classes. -
[1.7.10]Make Mob not attack itself
TheRealMcrafter replied to BoonieQuafter-CrAfTeR's topic in Modder Support
Create your own EntityAIAttackWhatever class, and override shouldExecute() and write your own condition. Like public boolean shouldExecute() { EntityLivingBase entitylivingbase = this.attacker.getAttackTarget(); if (entitylivingbase == null) { return false; } else if (!entitylivingbase.isEntityAlive()) { return false; } else if (entitylivingbase instanceof YourMobNameHere) { return false; } //All the other checks, etc. } else { return true; } } } -
[1.7.10] Item onRightClick returning the same thing
TheRealMcrafter replied to KakesRevenge's topic in Modder Support
detectAndSendChanges() scans the players server side inventory and pushes the changes to the client, forcing it to update. -
[1.7.10] Item onRightClick returning the same thing
TheRealMcrafter replied to KakesRevenge's topic in Modder Support
I just tried this: @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player){ if (!world.isRemote){ player.inventory.addItemStackToInventory(new ItemStack(SirenMod.FireExtinguisherItem, 1)); player.inventoryContainer.detectAndSendChanges(); } return stack; } and it worked fine for me. -
[1.7.10] Item onRightClick returning the same thing
TheRealMcrafter replied to KakesRevenge's topic in Modder Support
You should add the itemstack on the server side, ie: !world.isRemote. You might have to call player.inventoryContainer.detectAndSendChanges(); after you add the new itemstack for it to update to the client. -
How to make different block metadatas drop different items?
TheRealMcrafter replied to bokisa12's topic in Modder Support
I've also used the getDrops method. And the reason I did that was because when I first started modding I didnt know the proper way to do it. -
How to make different block metadatas drop different items?
TheRealMcrafter replied to bokisa12's topic in Modder Support
What I did in my mod was return null in getItemDropped, and then in the BreakEvent I spawned whatever ItemStack I wanted. EDIT: An easier alternative would be to spawn the itemstack in the breakBlock method -
[1.7.10] Can't pickup spawned item.
TheRealMcrafter replied to Awesome_Spider's topic in Modder Support
Woops, my bad. Your tutorials are the best, credit given -
[1.7.10] Can't pickup spawned item.
TheRealMcrafter replied to Awesome_Spider's topic in Modder Support
Example: I use this to send a string to the server from the client: The message class: https://github.com/TheRealMcrafter/SirenMod/blob/master/src/main/java/TheRealMcrafter/SirenMod/packet/SirenModUpdateSirenColorMessage.java Feel free to browse around my source to figure it out. -
I had the same exact issue, and instead of using PlayerTickEvent i used EntityJoinWorldEvent and casted. Fixed the probem, and everything works nice now.
-
[1.7.10] Can't pickup spawned item.
TheRealMcrafter replied to Awesome_Spider's topic in Modder Support
Yea, if you spawn it on the client side it will just be a ghost item. You need to send a packet to the server and spawn it there. -
[1.7.10] Can't pickup spawned item.
TheRealMcrafter replied to Awesome_Spider's topic in Modder Support
Are you spawning it on the client side or the server side? -
[1.7.10] Tile Entity apparently losing data
TheRealMcrafter replied to Aevek's topic in Modder Support
You could also use the default tile entity syncing, getDescriptionPacket() and onDataPacket(), and whenever you need to send data to the client, mark the block for an update. -
Thanks so much!
-
Not working, I cant publish to the server
-
Hey, how can I put my existing mod source into a new repository on GitHub? I cant find a tutorial to do this in Eclipse. I already have a GitHub account.