Everything posted by Animefan8888
-
[1.10.2][SOLVED] reading/creating/writing config for my mod??
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?
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?
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
That is a different method. Oops, just searched for apply in ItemMonsterPlacer and saw that one first on closer inspection you are indeed correct.
-
Held Block Display
Change the parent back.
-
Crafting Recipe for Spawnegg of own Entity
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
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
His code is correct except maybe one thing. I believe it should be registered in preInit.
-
[1.10.2] Issue Drawing Gui to Screen
The listener system. It is why when you create a GuiContainer you pass a container.
-
[1.10.2] Issue Drawing Gui to Screen
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.
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
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
Attack with void DamageSource ie Entity#attackEntityFrom(DamageSource.outOfWorld, amount);
-
[1.10.2] Getting the main entity from a entity part
What are you trying to do?
-
[1.10.2] Issue Drawing Gui to Screen
Not null? Of course those are easy to find.
-
[1.8.9] Rotate player's model
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.
-
[1.8.9] Rotate player's model
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
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.
-
[1.8.8] How to render a block with a TESR by using the IBakedModel of another?
Here's a pastebin link to the code: http://pastebin.com/8bWqKY2r Line 47 is the BlockModelRenderer.renderModel() call. I believe that you should not have lines 44, 46, and 48.
-
Registering a Texture to a Seed/Food.
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.
-
Registering a Texture to a Seed/Food.
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?
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
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 ?
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 ?
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"));
IPS spam blocked by CleanTalk.