-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Everything posted by Animefan8888
-
Custom GUI show when world is created [Solved]
Animefan8888 replied to Spaceboy Ross's topic in Modder Support
Create a capability that simply stores a boolean of hasConnected or whatever and in the EntityJoinWorldEvent check that capability and if it is false then open a gui via EntityPlayer#openGui -
Depends on what you are saving, it might be more efficient to sync the data as primitives. IE ByteBuf#writeInt or ByteBuf#writeShort. You will need to have a packet either way.
-
It could, but why you can do a simple addition yourself. I meant why do you need the health prior to the last damage. I'm not sure I understand why you are going about doing this. What is causing a problem about the vanilla implementation.
-
Annotation not allowed here in @SidedProxy
Animefan8888 replied to PistoFranco's topic in Modder Support
Instead use an interface called IProxy, the idea of a CommonProxy is illogical. Your "CommonProxy" is your @Mod class. -
1.7.10 isn't supported on this forum anymore, update if you wish to receive assistance.
-
This will not happen, this is to ensure that potion effects are not changeable client side, for obvious reasons(it can and will be exploited). It is protected because Mojang had no use for it to be public, aka it wasn't intended to be used outside of an Entity. What is it that you are getting this for? This will not happen as this requires too much editing for a feature that will not really be used for much.
-
Read it try to understand it, ask specific questions to try to understand it.
-
I believe so, also the first string you pass in to the EnumHelper.addArmor will point to the name of the armor at "textures/entity/horse/armor/horse_armor_" + name
-
Well then you could simulate that if you wanted to, most likely, but you could also as an alternative.
-
Define animated if you mean like fire, return a different texture based on world time, if you dont you will have to manually render this in RenderLivingEvent.
-
minecraft 1.12.2 modded server issue
Animefan8888 replied to James51203's topic in Minecraft General
Try running it with only forge, also post your debug.log file. For the server and if you can get it the debug.log of one of your friends that time out. -
Block hitbox made of several parts possible?
Animefan8888 replied to deerangle's topic in Modder Support
This isn't that hard actually. Just subscribe to DrawBlockHighlightEvent and render the lines of the bounding box you can look at how vanilla does it for an example. -
public String getHorseArmorTexture(net.minecraft.entity.EntityLiving wearer, ItemStack stack) Which exists inside the Item class.
-
Creating and rendering a loot table everytime you kill a entity
Animefan8888 replied to Discult's topic in Modder Support
You can use a capability to store the loot box and a timer and you will have to sync this to all players within a certain distance. And use the RenderPlayerEvent to render the box/plane. -
[1.12.2] [SOLVED] GUI Renders only one color of texture
Animefan8888 replied to Bektor's topic in Modder Support
Gui#drawModalRectWithCustomSizedTexture -
[SOLVED] [1.12.2] Restrict item to certain slots
Animefan8888 replied to Daeruin's topic in Modder Support
This is not true, openContainer is always the container the player has open, it seems to default to inventoryContainer instead of null. Try stepping through your code in the debugging when you are replacing the slots and when you are trying to put the item in the slot. -
Creating and rendering a loot table everytime you kill a entity
Animefan8888 replied to Discult's topic in Modder Support
Define render, do you want it to be a gui, an overlay on to the HUD, or an entity that only renders for the person who killed it? -
[SOLVED] [1.12.2] Restrict item to certain slots
Animefan8888 replied to Daeruin's topic in Modder Support
Is it ever calling the super method, is that returning false? -
[SOLVED] [1.12.2] Restrict item to certain slots
Animefan8888 replied to Daeruin's topic in Modder Support
Minecraft.getMinecraft().player -
[SOLVED] [1.12.2] Restrict item to certain slots
Animefan8888 replied to Daeruin's topic in Modder Support
Try removing the stack.isEmpty || part. If this is the case also use GuiOpenEvent and interact with EntityPlayer#openContainer, but only if it is not inventory container. -
[SOLVED] [1.12.2] Restrict item to certain slots
Animefan8888 replied to Daeruin's topic in Modder Support
Doing what I said if you do it correctly will not cause incompatibility with other mods. Edit: Also. Either way you would have to determine if the container had the hotbar. In case of my way all you would have to do is subscribe to the ContainerEvent.Open (might have the name wrong) and apply the search and change the slots. -
[1.12.2] How do I make a Potion? (Not Potion Effect)
Animefan8888 replied to XmorpH's topic in Modder Support
Make your own class and override the methods that allow you to drink it and apply the potion effect. -
[SOLVED] [1.12.2] Restrict item to certain slots
Animefan8888 replied to Daeruin's topic in Modder Support
You could modify Container#inventorySlots to change the mainInventorySlots to your own slots. Do this in EntityJoinWorldEvent by using the EntityPlayer#inventoryContainer field. -
Sadly not true. It doesn't fire for the players own inventory gui, at least in survival mode. You will need to modify EntityPlayer#inventoryContainer directly. Do this obviously, reflection is pricey. Not true, at least for the ContainerPlayer. It just doesn't allow you to shift click into the slot, but you can do so out of it. However this is true do to other mods messing with this Container. There should be some form of forge implementation around this as a proper method of doing this. @SuperKael If you do wish to do this Use OnEntityJoinWorldEvent to modify EntityPlayer#inventoryContainer and GuiScreenEvent.BackgroundDrawnEvent to render more onto the Gui if it can happen before the original gui is rendered, and if it needs to be after use GuiScreenEvent.DrawScreenEvent.Pre/Post