Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

FLUFFY2

Forge Modder
  • Content Count

    424
  • Joined

  • Last visited

Community Reputation

14 Good

About FLUFFY2

  • Rank
    Diamond Finder

Converted

  • Gender
    Male
  • Location
    Hungary
  • Personal Text
    NO copy-paste from me!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. You guys dont understand... I have a gun that has EntityBullet extending EntityThrowable. Registered in the EntityRegistry!!! In survival i go close to any living entity, like cow or zombie i keep shooting MYSELF sometimes, and eventually i kill myself. Go ahead get snowballs, go close to a cow and start throwing it at him, sometimes it will do nothing to the cow, because it hits you. Thats because the onImpact() method resoult.entityHit returns the thrower sometimes. I made a new class called EntityShootable, that is a straight copy of EntityThrowable, and my EntityBullet call
  2. I would suggest you to try snowballs in close range with zombies. You will sometimes hit yourself with the snowball. Even in creative you will see that the snowball explodes in fornt of you(sometimes). Now imagine a gun that is used in close combat and the bullet straight hits you. You die... and thats annoying. I will try to supply you with a code that you can test and see later.
  3. I found out that EntityThrowable has a bug where sometimes the thrown entity straight up hit its thrower. So i made a custom EntityThrowable named EntityShootable and i found that there is a problem in its onUpdate() method logic. Entity entity = null; List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.getEntityBoundingBox().addCoord(this.motionX, this.motionY, this.motionZ).expandXyz(1.0D)); double d0 = 0.0D; boolean flag = false; for(int i = 0; i < list.size(); ++i){ Entity entity1 = list.get(i); if(entity1.canBeCollidedWith()){ if(
  4. Well you guys were damn right... Lesson learned, client is not always "client", thanks!
  5. With a client side only registered PlayerTickEvent i would doubt that. But hey... try yourself: Register this in your ClientProxy: @SubscribeEvent public void PlayerTick(PlayerTickEvent event){ if(event.phase == Phase.START){ EntityPlayer player = event.player; System.out.println(player.getPosition()); } }
  6. I have made a custom throwable entity which causes damage if it hits a living entities. Now sometimes the custom entity dosen't even fly away, just straight causes damage to the thrower itself. Mostly happends when you are really close to another living entity. You can try this with snowballs too, if you walk pass or close to a zombie, than you go like 2-3 blocks away, the snowball will most likely explode in fornt of you, and never cause knockback on the zombie. This must be some bug with the EntityThrowable class's onUpdate method because only this part is revalent to the actua
  7. My bad... forgot to tell: If you use the method in a ticking event, you will see each tick it will show a different value. It just swaps between two positions.
  8. Hi, It seems like when im at the edge of 2 block .getPosition() returns both blocks pos. This is very annoying... Hope it can be fixed. Right now the current fix would be: new BlockPos(Math.floor(player.posX), Math.floor(player.posY), Math.floor(player.posZ));
  9. If you mean that the client not recieving the server config, than its a problem at your side. You have to manually send the server config to the connecting player with a packet to update the client. Also you have to make sure that, when you disconnect form the server, reset the client config to its original state. Use: ServerConnectionFromClientEvent ClientDisconnectionFromServerEvent
  10. Hi, I know things like that got discussed before, but it looks like they never actually make it into Forge. Now i come up with something that might worth thinking about and its compatible with other mods, but somewhat "limited". Back in 1.7.10 we could achieve this with RenderPlayerEvent.Specials, but i think that caused incompability with other mods, and Specials was never supposed to be used for that. The idea of mine is to only be able to rotate the hand if we the item is held. The method would look like this in the Item class: public float rotateArm(ItemStack item,
  11. Thanks guys forge-1.8.9-11.15.0.1692 finally fixes the issue. It took you guys long, but i really apprechiate it!
  12. You know that onEntityCollidedWithBlock() is called every tick right? You just can't kill the Minecraft fast enought to trigger the event only once. I suggest using a boolean.
  13. Hi, I don't know form what version of Forge but the display option "ground" stopped working in the json models. "ground": { "rotation": [ 0, -90, 90 ], "translation": [ 0, 1.8, -1 ], "scale": [ 0.8, 0.8, 0.8 ] } This will do nothing to the model when its dropped on the ground, but it worked before. Im currently on: 11.15.0.1637 Thanks!
  14. Never mind, this was a stupid thread by me. -.-
  15. First of all: for(int i=0; i < inv.getSizeInventory(); i++) { if(inv.getStackInSlot(i) != null) { ItemStack j = inv.getStackInSlot(i); if(j.getItem() != null && j.getItem() == ModItems.bullet) { inv.decrStackSize(i, 1); i = inv.getSizeInventory(); } } } That will decrease 1 form all the bullet stacks that is in your inventory. A boolean should fix it. Than, there is a thing player.posX, player.posY, player.posZ. Finally: (player.inventory.hasItem(ModItems.bullet) Returns true for some reason. How did you register y
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.