Everything posted by Niprow
-
[1.15.2] ClientPlayNetHandler and ServerPlayNetHandler
you send minecraft packets via the the <Dist>PlayNetHandler and for your own look into the docs SimpleImpl
-
[1.15.2] entity as light SOURCE
thanks even if it's frustrating
-
[1.15.2] entity as light SOURCE
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?
-
Get amount of blocks mined from Statistics 1.
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
-
[1.15.2] How to clear/reset the chat ?
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 ?
-
[1.12] Getting existing chest gui/items
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
-
[1.15.2] Animating an entity model
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
-
[1.15.2] Animating an entity model
you can just animate it in the renderer
-
[SOLVED] [1.15.2] Rotate Player's model
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.
-
[SOLVED] [1.15.2] Rotate Player's model
you should use the MatrixStack of the event (RenderPlayerEvent.Pre#getMatrixStack)
-
Block texture showing up in inventory, but not placed.
-
How do i make a block do stuff, if i aim at it and press a specific key on keyboard?
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 } } }
-
How do i make a block do stuff, if i aim at it and press a specific key on keyboard?
no no you do not have to and you could just create a new constructor? please show your code
-
Block texture showing up in inventory, but not placed.
- Block texture showing up in inventory, but not placed.
yes in: run-> logs-> latest.log- [SOLVED] [1.15.2] Rotate Player's model
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!- [SOLVED] [1.15.2] Rotate Player's model
You have to use the "FORGE" event bus- [1.15.2] How to check if a certain item is in hand
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- save blockstates on itemstacks (solved)
You cannot save things in an Item. You have to put the things in an ItemStack.- [1.15.2] [SOLVED] Problems with BlockStates
It seems to me this is the error. The problem could be your editor. Wich one did you use first?- [1.15.2] Spawning Entities on Custom Block?
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?
That's not how it works here. We are averse to copy-paste code- [1.15.2] Modded item in recipe book
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.- [1.15.2] [SOLVED] Problems with BlockStates
please make a github repo so we can see your "real" code.- How can i render a simple png image in the top left corner of the screen?
you could use the net.minecraft.client.event.RenderGameOverlayEvent - Block texture showing up in inventory, but not placed.
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.