-
Posts
68 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Niprow
-
[1.15.2] ClientPlayNetHandler and ServerPlayNetHandler
Niprow replied to Corgam's topic in Modder Support
you send minecraft packets via the the <Dist>PlayNetHandler and for your own look into the docs SimpleImpl -
thanks even if it's frustrating
-
I want my entity are a light source not only be bright (with texture). It's a living entity with a SegmentedModel. Are there examples? Is it a question of a RenderType or something else? And what do I have to do to change the light to blue?
-
see: ClientPlayerEntity#getStats StatisticsManager#getValue(Stat<?>) StatType#get //for one block StatType#iterator //for all existing and you have to say minecraft on the client side that you want the stats with Minecraft.getInstance().getConnection().sendPacket(new CClientStatusPacket(CClientStatusPacket.State.REQUEST_STATS)); and you don't need to go over CUSTOM
-
If you look in the code yourself you may not have to wait for such a long time. But here it is: NewChatGui#clearChatMessages good luck ?
-
where do you call that? edit: sorry do not read 1.12 cannot help you and generally it is not longer supported at this forum
-
I would make it so that I would somehow store what is to be rendered in the renderer and then control it with a boolean. I would then synchronize this boolean with SimpleImpl or whatever
-
you can just animate it in the renderer
-
not really the position of the entity is still the same. But of course the rotation of the model is dependent on the rotation point. And it looks to me that it would be harder than just rotate one axis.
-
you should use the MatrixStack of the event (RenderPlayerEvent.Pre#getMatrixStack)
-
Block texture showing up in inventory, but not placed.
Niprow replied to LinuxMinecrafter234's topic in Modder Support
-
Oh where could forge hide key-bindings? Maybe in the class KeyBinding? and for clean code that could be a PacketHandler class with a Message class: public class PacketHandler { private static int IDs = 0; private static final String PROTOCOL_VERSION = "modid"; public static final SimpleChannel INSTANCE = NetworkRegistry.newSimpleChannel( new ResourceLocation("modid", "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); //called in pre_init public static void init() { INSTANCE.registerMessage(IDs++, Message.class, Message::decode, Message::encode, Message::consumer); } private static class Message { //some stuff protected static void consumer(Message chantal, Supplier<NetworkEvent.Context> justin) { //where you have to handle the stuff that contains chantal and maybe justin } protected static Message encode(PacketBuffer johan) { //where you get the stuff from johan and have to put it in your message return null; } protected static void decode(Message martin, PacketBuffer johan) { //where you have to write the stuff into johan out of martin } } }
-
Block texture showing up in inventory, but not placed.
Niprow replied to LinuxMinecrafter234's topic in Modder Support
-
Block texture showing up in inventory, but not placed.
Niprow replied to LinuxMinecrafter234's topic in Modder Support
yes in: run-> logs-> latest.log -
The event is only thrown when you are in third person or when a other player looks at you. Is that the problem. I hope because it all looks fine!
-
You have to use the "FORGE" event bus
-
[1.15.2] How to check if a certain item is in hand
Niprow replied to TowerMX's topic in Modder Support
do you want to click or mine the block? if you want to click you could do that: - override Block#onBlockActivated (you are right) - check if the item is the special (Player#getHeldItem (its the ItemStack so you can get the id (ItemStack#getItem) and the nbt)) - if so you could use InventoryHelper#spawnItemStack but it would be batter to create a loot-table and spawn it somehow in the world -
You cannot save things in an Item. You have to put the things in an ItemStack.
-
It seems to me this is the error. The problem could be your editor. Wich one did you use first?
-
the second is deprecated don't use it and I guess you have to add the entities that you want to spawn somehow to your biome
-
How do I make an item that when used gives another item?
Niprow replied to martiblq's topic in Modder Support
That's not how it works here. We are averse to copy-paste code -
as long as he wants it in his own creative tab it will not appear on tools. I already did a brunch and a pull request on GitHub, that will make this possible.
-
please make a github repo so we can see your "real" code.