-
Posts
1160 -
Joined
-
Days Won
7
Everything posted by poopoodice
-
override getAttributeModifiers in ur item class, you can also check how sword does similar thing
-
It's call ItemGroup now, and no need to extend anything, everything is in ItemGroup include vanilla ones
-
same but different parameter: RenderingRegistry.registerEntityRenderingHandler(EntityType<T> entityClass, IRenderFactory<? super T> renderFactory)
-
use the new registerEntityRenderingHandler that requires an entity type, and createSpawnpacket looks right
-
try store the data in world provided by MinecraftServer.getWorld(dim), which I think it's the world that exist on the actual server
-
Maybe there's a better way of doing this but maybe store the entity UUIDs in a hashmap or something and also pass the length (size) of the map to the packet. Or just check the distance between the entity and the player is in a suitable distance, like the sendToAllNearExcept in PlayerList.
-
player.getMotion
-
[1.15.2] Changing variable value for single instance of item
poopoodice replied to Dandan642's topic in Modder Support
Under what condition will you suggest capability than nbt tags? -
[1.15.2] Changing variable value for single instance of item
poopoodice replied to Dandan642's topic in Modder Support
use getTag to get tag from the itemstack, and store/get the data from it. Btw in my experience setting stack tag on client does not work. -
[1.15.2] Changing variable value for single instance of item
poopoodice replied to Dandan642's topic in Modder Support
use it where you want to access/set the data, which option you are using? -
[1.15.2] Changing variable value for single instance of item
poopoodice replied to Dandan642's topic in Modder Support
Capability nbt tag compound: use stack.getTag() to get the existing tag of the itemstack, .putBoolean, putInt..etc to store data .getBoolean, getInt... etc to get stored data from the nbt tag -
[1.15.2] Changing variable value for single instance of item
poopoodice replied to Dandan642's topic in Modder Support
Use nbt tags or capability to store data in itemstacks instead otherwise every hammer (item) will share the same data stored because there's only "one item" but multiple itemstacks. -
I'm thinking it's probably because they don't sync the velocity every tick (called update interval or velocity update... not sure), therefore the client does not know the entity has stopped it's motion... you may need to do that yourself
-
put notSolid into ur block property builder, btw there's a same topic few hours ago, there's more detail
-
Where do you want to access the player's position?
-
My Models Make it so you can see through the world
poopoodice replied to jakethesnake123's topic in Modder Support
could be, I'm using 31.1.87 -
My Models Make it so you can see through the world
poopoodice replied to jakethesnake123's topic in Modder Support
Which forge version you are using? Because I can't seem to find it in mine -
My Models Make it so you can see through the world
poopoodice replied to jakethesnake123's topic in Modder Support
isOpaqueCube only exist in 1.12 : p use block properties.notSolid instead, and yeah, modify the voxel shape should also work -
The position of the player is stored in PlayerEntity getPosition() getPosX/Y/Z() and lot more similar things
-
You may need to render them in render player event, not sure in pre or post tho, but I think they both works since you are not "interacting" with the player.
-
you will need to override some methods such as getStateForPlacement() which provides a blockstate for the blockitem to determine what states does the block have when added, normally something like return getDefaultState() .with(HORIZONTAL_FACING, context.getPlacementHorizontalFacing()); The rotate method you override is probably for structure generation or so.. not so sure.
-
In my opinion making a minecraft mod can also be a very good way of learning java. You research when you are stuck, and learn from it. Also having the experience of "actually" creating something can gives you some willing to keep going on. But of course, it will never be a bad idea to have some basic knowledge of java.