-
Posts
1160 -
Joined
-
Days Won
7
Everything posted by poopoodice
-
Thank you! I will have a look at them
-
I notice that OnItemRightClick() in the item init was not being called every tick. But I want it to be called every single tick so it can be detected when players hold their mouse in right-click position. How do I solve this? Another question, in the entity class is setSize(0.0625F, 0.0625F) the minimum collisionbox size it can reach?
-
How do gun mods make their bullets (projectiles) so small? And their bullets can hit exactly the player is looking at (the cross in the middle of the screen), my bullets are still too big although I set thier size to the minimum size using setsize(). Any ideas?
-
Sounds nice isnt it? It makes everything much easier although it will not be as real as others; ). Another question is do I still need to make an entity for this or can I just simply do it in the gun init? But does that also means that I can't make such stuff like bullet holes, particles etc.?
-
What do you mean by "wouldn't allow for the target to move out of the way." Does you mean the entity wont be able to move or ?
-
So basically I fI want to make I bullet, I dont even have to "launch" the bullet, I just damage the nearest entity that is on the path? Will it work if I done something like that.
-
That's exactly what Im trying to say. The projectile start acting weird when its acceleration gets too high. The bounding box gets weird as well.
-
Ive read the code of those projectiles, they are really confusing because they too much math calculations and different variables such as motions, accelerations etc. (I’m suck at mechanics). But yeah, I will try again later on. Just one last question, I’ve checked Mr Crayfish's gun mod and flansmod source code, why did they wrote such complicate code, isn’t bullet just a simple entity?
-
yea I do know you can ctrl left-click the method to open the declaration, I was just wondering how to make an entity that launches base on where the player's aiming...... and that's a lot more harder than I thought. Thanks for your tips tho. Do you think it is easier for EntityBullet to extend EntityThrowable or just Entity? I tried lots of things based on fireball but they all act weird or not function properly.
-
Aight I see. Btw do you know what the three numbers that player.getLookVec() returned represent?
-
I do notice about that function, I just wondered how does it generate the collision box within only two arguments (doubles)
-
How do I suppose to change a custom entity's collision box, note the entity isn't a livingbased entity, it's more similar to projectiles, I've checked the vanilla fireball entity class, render class, and model class but I either missed or didn't notice that there are any thing that is related to the bounding box. If so, which method should I use in which class of the entity?
-
I know what are you saying, I am just too tired and making everything too complicated after no sleep for a while. Ah my brain hurts but it is working now thanks.
-
My block init extends blockdirectional which is public static final PropertyDirection FACING = PropertyDirection.create("facing"); in the blockdirectional class
-
Yes but how do I fix it since it is in tileentity not the block init?
-
IBlockState state = state.getPropertyKeys(FACING); world.setBlockState(getPos(), MFBlocks.FLASH2_ALARM_LIGHT.getDefaultState().withProperty(IBlockState, world.getBlockState(pos).getValue(FACING))); IBlockState state = state.getPropertyKeys(FACING); world.setBlockState(getPos(), Blocks.END_ROD.getDefaultState().withProperty(FACING, world.getBlockState(pos).getValue(FACING))); I wrote something like this but FACING is undefined
-
So yesterday I have successfully create the tileentity. My target is to set a block using world.setblockstate in the update() function in the tileentity. My question is I want the new block I set has exactly the same FACING property direction, how do I solve this with .withProperty?
-
Yea i just notice that I import the render one ty
-
Although I implemented ITickAble I couldnt find the method
-
I created a tileentity for the block. is tick() function im looking for?
-
I want my block to update every tick, I used updateTick() in the block class but it doesn't work, and the way to solve this problem is to setRandomTick in the constructor, but this makes block receives random ticks which is not what I want. Any way to solve this? Should I make a tileentity for it and implement ITickAble or there are more simple ways to do it?
-
Okay, thx
-
Even if the data I wanted to store is just string? I don't want things to get too complicated.
-
Alright so I used player.getEntityData().setString(key, value) in onArmorTick method. the thing next is to read the nbt tag. Ive create a handler class that handles events, do you know which event should I use and how so I can do things after reading the tags
-
I am finding a way to set nbt tag to players. But only found how to create and use capabilities on players not nbt tags. The thing I want to do is when the player with a specific armor equipped, the player's nbt tag will be set to a value in the armor class onArmorTick. And the other class can check the nbt tag on the player and do correspond things. Any reply will be appreciated.