Robertusxd
Members-
Posts
23 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Robertusxd's Achievements
Tree Puncher (2/8)
0
Reputation
-
[1.12.2][solved]automated attacks dealing less damage
Robertusxd replied to Robertusxd's topic in Modder Support
i found the solution, this.attacker.inventory.setPickedItemStack(this.getBestAttackItem()); is not working correctly and only showing you client side that u are holding that item. on the server i was hitting the monsters with bare hands. -
some information: i have applied an AITask to the EntityPlayerSP that attacks every EntityMob that gets within attack range. it works fine but for some reason the automated attacks take 10+ hits to kill a mob with a diamond sword. private void performAttack(EntityLivingBase target) { this.lastAttackTick = Minecraft.getMinecraft().world.getTotalWorldTime(); this.attacker.inventory.setPickedItemStack(this.getBestAttackItem()); this.attacker.swingArm(EnumHand.MAIN_HAND); Minecraft.getMinecraft().playerController.attackEntity(this.attacker, target); } this is the code that performs the attack. the field lastAttackTick is used to make sure that i only attack when its supposed to deal full damage. before i used if(this.attacker.getCooledAttackStrength(0F) == 1) but i had the same problem with that. getBestAttackItem() returns the ItemStack with the most ATTACK_DAMAGE in the players inventory. i hope i offered enough information and someone know what the problem is thanks in advance
-
Sry if im just being dumb or blind but i cant seem to find a render tutorial thats not completly outdated. So if someone could point me in the right direction i'd be thankful. Right now im looking to render a custom projectile if that matters. Thanks in advance.
-
you are my hero right now, thank you so much
-
yes im in survival mode as i said the setAttackTarget method of the entity gets called but the entity does not react to it.
-
i tried it but it didnt change anything
-
So my problem is that my Entity does not attack. Its not just dealing no damage it does not even move towards the target or do anything at all really. Entity: https://pastebin.com/d9dAzjM0 EntityNeutral: https://pastebin.com/R2R1Raqx WalkHomeAi: https://pastebin.com/1ECiWBsD AttackAI: https://pastebin.com/08Xvq8tt But i dont think it is a problem with my AI since i also tried Minecrafts AIs EntityAIHurtByTarget and EntityAINearestAttackableTarget and they didnt work either. I also used System.out.println to see if the setattacktarget method of my entity is called and it does get called.
-
thanks alot guys
-
yea im using my account, how can i run it without mine?
-
thats how i start the server, but how do i get two clients on that server? when i start 2 clients afterwards they have the same name and one of them joining kicks the other one
-
im using eclipse, not quite sure how to do that
-
thats the first thing i found when i googled it but im not a 100% sure on how to use it. i tried it out but i have no real way to test it in single player
-
Thats super helpful thank you. i will try it out later
-
So i been looking around a little but didnt really find a way to do this. Im basicially creating a gamemode where two teams are playing against each other and within these teams the players should not be abe to attack each other. So what i need is to turn off PvP between some Players but towards other Players it still has to be turned on. I hope there is a way to do that and thanks in advance.