-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Everything posted by Animefan8888
-
[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. -
TileEntities that are not in World - Can I do this better?
Animefan8888 replied to Draco18s's topic in Modder Support
Oh *I* can get the blockstate from an item stack. That's not the problem. The problem is I want to instantiate the tile entity associated with that state and invoke getCapbability. I have no control over what someone else's getCapbability does...such as doing worldObj.getBlockState(this.getPos()) Instantiate the TileEntity with Block#createTileEntity(IBlockState) using the method I said above. Which will give you the TileEntity for that specfic BlockState. Correct? -
TileEntities that are not in World - Can I do this better?
Animefan8888 replied to Draco18s's topic in Modder Support
You could call get placed blockstate or getStateFromMeta. If I understood it correctly you have an ItemStack of a Block you shouold be able to get the block from the Item in the stack, then get the blockstate from those methods. That doesn't actually solve the problem, because if the TE uses that world, it's BlockPos is still 0,0,0 and it itself doesn't exist there, so it will fail to retrieve its own blockstate. -
Crafting Recipe for Spawnegg of own Entity
Animefan8888 replied to Kruki21's topic in Modder Support
That is a different method. Oops, just searched for apply in ItemMonsterPlacer and saw that one first on closer inspection you are indeed correct. -
Change the parent back.
-
Crafting Recipe for Spawnegg of own Entity
Animefan8888 replied to Kruki21's topic in Modder Support
I found the class ItemMonsterPlacer, but i wasn't able to find a method named applyEntityIdToItemStack :-/ It is actually called applyItemEntityDataToEntity in 1.10.2. -
[1.10.2] Getting the main entity from a entity part
Animefan8888 replied to Silly511's topic in Modder Support
You are probably better off doing that, but I believe my method of doing this would work. IE Create custom damage source deal 0.04 (somewhere around this), then subscribe to the living attack event (can't remember name off of the top of my head) and deal the appropriate amount of damage. Bypassing the whole need for a PR though would be nice for other features. -
[SOLVED][1.10.2] server side onbreak event not triggering
Animefan8888 replied to GodsVictory's topic in Modder Support
His code is correct except maybe one thing. I believe it should be registered in preInit. -
[1.10.2] Issue Drawing Gui to Screen
Animefan8888 replied to abused_master's topic in Modder Support
The listener system. It is why when you create a GuiContainer you pass a container. -
[1.10.2] Issue Drawing Gui to Screen
Animefan8888 replied to abused_master's topic in Modder Support
Look at how the vanilla furnace syncs it's info it does so with its container. -
Block texture not shown in hand, but on ground.
Animefan8888 replied to gmod622's topic in Modder Support
dont make it all into 1 json file, make 1 json file for the blockstate and 1 for the block model, make sure you put the blockstate json into the correct folder and the block model json in the correct one aswell That is the blockstate file... @gmod622 Post the console output. -
Trying to create an event where a player holds a custom item
Animefan8888 replied to RBHB16's topic in Modder Support
First thing is first do you know Java? If you do explain what a static reference is... EntityItem.getEntityItem() -
[1.10.2] Getting the main entity from a entity part
Animefan8888 replied to Silly511's topic in Modder Support
Attack with void DamageSource ie Entity#attackEntityFrom(DamageSource.outOfWorld, amount); -
[1.10.2] Getting the main entity from a entity part
Animefan8888 replied to Silly511's topic in Modder Support
What are you trying to do? -
[1.10.2] Issue Drawing Gui to Screen
Animefan8888 replied to abused_master's topic in Modder Support
Not null? Of course those are easy to find. -
In the RenderPlayerEvent.Pre get the model object for the player, then call set rotation. If that doesn't work I do not believe it is possible at the moment though another thing I would try is In Pre run a GL call to roatate and then in Post undo the rotation. You mean access the model through the event? Confirmed GL calls work, you'll just need to figure out the math for the rotation angle.
-
In the RenderPlayerEvent.Pre get the model object for the player, then call set rotation. If that doesn't work I do not believe it is possible at the moment though another thing I would try is In Pre run a GL call to roatate and then in Post undo the rotation.
-
Stack is far away from mouse when holding it in GUI
Animefan8888 replied to BeardlessBrady's topic in Modder Support
I want to say it has to do with this line GL11.glScaled(0.8, 0.8, 0.; inside your GUI class. Try using the GL11.pop and push methods. -
Is ItemSeedFood your own class or a vanilla one? If vanilla calling your register function only ever registers a model for ItemModelProvider. Otherwise post ItemSeedFood.
-
Is the model file name matching/correct? Is it in the right package? Is your texture in the right package? Is it the correct name? If you can't tell me post your JSON and a screenshot of your path.
-
What am I supposed to name my texture files?
Animefan8888 replied to an_awsome_person's topic in Modder Support
So you're asking me to copy this into my jsons? No this is how they should be structured normally. -
[1.10.2] Modifying the enchantment levels based on the the player
Animefan8888 replied to gibraltar's topic in Modder Support
Post code, and private fields can be accessed through reflection; methods on the other hand should not be edited at all. Thus, the overriding the container by extending the container, you can submit a Pull Request on their github to add an event provide code and I think a patch file. -
[SOLVED!] how to use addSubstitutionAlias ?
Animefan8888 replied to trollworkout's topic in Modder Support
Use your public static final variables instead of my in method variables and note "wr" is the modid, and the meta of 1 is incorrect use 0. You should really try the... -
[SOLVED!] how to use addSubstitutionAlias ?
Animefan8888 replied to trollworkout's topic in Modder Support
The setRegistryName should be fine, but Item.getItemFromBlock doesn't respect aliasing it only accesses the registry data and not the aliasing data. My testing code... Block block = null; Item item = null; try { block = new BlockCauldron().setRegistryName(new ResourceLocation("wr", "cauldron")); item = new ItemBlockSpecial(block).setRegistryName(new ResourceLocation("wr", "cauldron")); GameRegistry.addSubstitutionAlias("minecraft:cauldron", Type.BLOCK, block); GameRegistry.addSubstitutionAlias("minecraft:cauldron", Type.ITEM, item); } catch (ExistingSubstitutionException e) { e.printStackTrace(); } ModelLoader.setCustomModelResourceLocation(item, 1, new ModelResourceLocation(new ResourceLocation(ModReference.MODID, "cauldron"), "inventory"));