-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Everything posted by Animefan8888
-
Container disappears when created by item.
Animefan8888 replied to gmod622's topic in Modder Support
This is probably why. Why are you doing this? int hook = net.minecraftforge.event.ForgeEventFactory.onHoeUse(stack, playerIn, worldIn, pos); if (hook != 0) return hook > 0 ? EnumActionResult.SUCCESS : EnumActionResult.FAIL; -
[1.10.2] Client can't connect to server
Animefan8888 replied to Tiffiter123's topic in Modder Support
According to the error you are sending a packet and it is erroring on this line https://github.com/tiffit/TaleCraft/blob/master/src/main/java/talecraft/network/packets/StringNBTCommandPacket.java#L34 With a index out of bounds exception as said in your log at line 1586. -
You wouldn't cause blocks are called from both sides. You must call it in your ClientProxy.
-
[1.10.2] [SOLVED] Gui That Doesn't Pause Game
Animefan8888 replied to Jimmeh's topic in Modder Support
Okay, I think this is the last problem. I created this new class, hold an instance of it in the ClientProxy, and just manually call ClientProxy.energyGui.draw() in the event you said above. The outline draws fine now and allows for movement, but the "inner" area (drawRect(...)) doesn't display at all. Would you happen to have any hunches off the top of your head? public class GuiEnergyBarTwo extends Gui { private int xSize = 116, ySize = 17; //size of desired window. Max is 256x256 public void draw(){ TextureManager textureManager = ClientProxy.MINECRAFT.getTextureManager(); textureManager.bindTexture(new ResourceLocation(Test.MODID + ":textures/gui/energybar.png")); GlStateManager.pushMatrix(); //---- inner ---- drawRect(0, 0, getRightCoord(), ySize - 1, 1); //---- outline ---- GlStateManager.enableAlpha(); drawTexturedModalRect(0, 0, 0, 0, xSize, ySize); GlStateManager.popMatrix(); } private int getRightCoord(){ int energyPercent = ClientProxy.clientInfo.getEnergyPercentage(); return xSize * (energyPercent/100); //this returns the needed percentage of the length of the rectangle } } Could you post ClientProxy.clientInfo.getEnergyPercentage(); -
Also post your block model jsons.
-
Creating advanced (Shift + Hover) Tooltips
Animefan8888 replied to gmod622's topic in Modder Support
Most likely in the "toolTip.add()" while the "sneak" key is not pressed it could render "Press " localized.key.name or something, would make it more dynamic Also a localization call. -
Creating advanced (Shift + Hover) Tooltips
Animefan8888 replied to gmod622's topic in Modder Support
Slight problem if I change my keybinding of sneaking to ctrl I would have to press ctrl instead of shift as the keybinding applies to different actions not individual keys. What? And only do what I said if the items are not yours, instead use the Item#addInformation(...) -
Creating advanced (Shift + Hover) Tooltips
Animefan8888 replied to gmod622's topic in Modder Support
You would have to create and event and the easiest way to get if shift is down is to access the gui object in the Minecraft class. -
Model elements fighting to render over each other
Animefan8888 replied to BeardlessBrady's topic in Modder Support
Have you taken a look at this? http://mcforge.readthedocs.io/en/latest/blockstates/forgeBlockstates/ ?? :'( yes but is missing the information i need. i need real example of using multiple layers in one model. There's more to it than just json. You also need to edit the java in specific way to return ModelLayer.SOLID && ModelLayer.TRANSPARENT something like that . Plus there's something where you can choose which part of the model renders on which layer which is not shown there. there's a part of the json where you can choose something like solid : "model.json" transparent: "water.json" blah blah. none of that is in there. I sortof figured all this myself but I never been successful at it. I just read about how MC renders transparency and I learned there are various layers and saw that forge can actually control which layer to render on based on an oldder forge model spec for version 1 it shows all the functions you can use but no actual example. Final resort if no documentation has been found look through the code that reads the json...yeah sounds like a wonderful idea huh?...I wish you the best of luck if you choose to go down that path. -
Model elements fighting to render over each other
Animefan8888 replied to BeardlessBrady's topic in Modder Support
Have you taken a look at this? http://mcforge.readthedocs.io/en/latest/blockstates/forgeBlockstates/ -
Model elements fighting to render over each other
Animefan8888 replied to BeardlessBrady's topic in Modder Support
It is very hard to explain, but basically you have multiple planes overlapping which can be fixed by removing uneccesary planes from the model. -
Do you ever actually call ModelLoader.setCustomModelResourceLocation(...)
-
[1.11] Changes on how to register entities?
Animefan8888 replied to American2050's topic in Modder Support
Post code. -
ok but how to do that (i'm new to guis) Since it is an inventory create a class that extends GuiContainer and a class that extends Container. Then look at vanilla for examples on what the methods do. is this what do you mean? https://github.com/lukas2005/IDEA-Mod/commit/a83ad2a0b48764333f3095d67bca07328d5d04d9 Yes, but you actually need to put information ie slots, slot interaction, etc. You should look into vanilla classes for this.
-
[1.10.2] How to trample crops when wearing certain armor
Animefan8888 replied to gibraltar's topic in Modder Support
Ah yes, forgot that method existed (I need to go to sleep) . Also assuming that this is your armor this way. -
[1.10.2] How to trample crops when wearing certain armor
Animefan8888 replied to gibraltar's topic in Modder Support
I suggest doing the PR and supplementary until it is implemented you could use PlayerTickEvent. -
Creating a crafting handler the exports multiple items
Animefan8888 replied to gmod622's topic in Modder Support
With the way it is setup each Output has a percentage of appearing and to add a recipe you need to make a new List<OutputWrapper> and add new ItemWrappers to the list, then finally add the recipe using the list. -
Are there console logs now?
-
Creating a crafting handler the exports multiple items
Animefan8888 replied to gmod622's topic in Modder Support
There are multiple one being your custom methods for getting a recipe look in FurnaceRecipes and return that aswell as look into your own, add yours similarly to FurnaceRecipes, but to your Maps. Or you can add the furnace recipes by looping through them and adding them. Though that wouldn't give you random chance. -
I think the forge way of doing entity update cancelation/management would be to use the event canUpdate for all entites deciding if they can update. For only living entities yse LivingUpdateEvent and if they are not supposed to update cancel it.
-
Creating a crafting handler the exports multiple items
Animefan8888 replied to gmod622's topic in Modder Support
I think it is quite obvious A Map of ItemStacks and ItemStack arrays and then a map of ItemStack and either integers or floats/doubles. -
[1.10.2][SOLVED] reading/creating/writing config for my mod??
Animefan8888 replied to lukas2005's topic in Modder Support
In preInit event has a Configuration object for your mod that is what you will use to create a config. do you mean FMLPreInitializationEvent#getSuggestedConfigurationFile()? Yes and then i can use normal JavaIO? and configuration file syntax is created by me? or is there a recommended way of doing this? Look into the Configuration methods all syntax/format is defined by it. You have almost no say. -
[1.10.2][SOLVED] reading/creating/writing config for my mod??
Animefan8888 replied to lukas2005's topic in Modder Support
In preInit event has a Configuration object for your mod that is what you will use to create a config. do you mean FMLPreInitializationEvent#getSuggestedConfigurationFile()? Yes