-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Everything posted by Animefan8888
-
Ok just a couple things you do not need to load the Colony from NBT if you already to in the TileEntity, you can just pass along the data by using the syncing strategy from ContainerFurnace. Do you really need all of those getters and setters in the container class? And third if the problem is in the Your Container class then it is probably the way you override transferStackInSlot(), but I do not see a way that would cause a problem.
-
[1.10.2] Only render block if player holds a specified item
Animefan8888 replied to Fubar's topic in Modder Support
You could override getActualState(...) then return the state that is not visible on the server, and if it is client side use Minecratf.getMinecraft().thePlayer to check if the client side player is holding the item and if so switch the blockstate to the visible one only client side. This will work I assume unless you plan on changing something other than the rending of the block, if you need some psuedocode ask. -
Is there any documentation on IBakedModels or should I go mess around with them to figure out what they can do?
-
TileEntitySpecialRenderer does not face the correct direction.
Animefan8888 replied to Raycoms's topic in Modder Support
EnumFacing says which way it is facing so after rotating it to face north, check if it is facing a direction lets say south, if it is rotate it again to the correct position. -
Where do you open the gui?
-
Then from my understanding you will most likely have to use a TESR. Though I myself have not done anything like this. I know that Block JSON's do not take any input so you can not use that.
-
[1.10.2][CLOSED]Creating Non Existing Blocks
Animefan8888 replied to Kaneka's topic in Modder Support
This would not be to laggy as it would only be a few certain blocks that are I assume keeping a multiblock from constructing? Or something similar. You should make a static Map of BlockPos linked to the BlockPos of your TileEntity then after a certain amount of time has passed remove the ones linked to your TileEntites BlockPos. The rendering should then be done in the Event mentioned prior. Drawing as mentioned prior as well. -
[1.10.2]NBTTagCompound uncaught exception upon exiting world?
Animefan8888 replied to T-10a's topic in Modder Support
What I would recommend is understanding how an Object Oriented Programming language works, before stepping into the world of modding, because things like re-initializing a field like that will obviously reset all of the data inside of it. Also understand the difference between initializing and creating. Because there is a big difference. And this is not a forum where you go to learn Java or any other programming language. So you should go refresh/learn Java before continuing. Java tutorial link -
Is it only going to display certain Items for example Items.APPLE and Items.CARROT?
-
[1.10.2]NBTTagCompound uncaught exception upon exiting world?
Animefan8888 replied to T-10a's topic in Modder Support
You are reinitializing your StackHandler every time you right click it, so obviously it will not contain an Item. Also you do not need an ItemStack field in your TileEntity as you are using an IItemHandler, an IItemHandler more specifically an ItemStackHandler only has access to its ItemStacks and there by uses them. I'm going to ask you how much Java do you know? -
[1.10.2]NBTTagCompound uncaught exception upon exiting world?
Animefan8888 replied to T-10a's topic in Modder Support
if (storedItem != null) //Write Item to NBT. -
[1.10.2][CLOSED]Creating Non Existing Blocks
Animefan8888 replied to Kaneka's topic in Modder Support
Is it your own blocks? Or is it Vanilla blocks? If it is the first one just use a blockstate that flips on when you press the button. With that there is no need to use events or A tesselator. -
Post your updated GUi, Container, and GuiHandler code. Even if it has not changed it will be easier to look at it.
-
This may not be the best way to do it, but you could add the NBT directly because all it does it look for a certain tag. I happened to stumble across this in PotionUtils PotionType.getPotionTypeForName(tag.getString("Potion")) Mainly the tag.getString("potion") part which you could set to the PotionType name which does contain LONG and STRONG in there names.
-
[Forge 1.10] Block that clears player inventory
Animefan8888 replied to admiralmattbar's topic in Modder Support
Sorry, but I'm not sure how to do this. Does this involve messing with NBT commands? No it does not how do you want the player to clear there inventory? -
Shortly, how can i render my tile entity? You don't render your TileEntity you render your Block with the model system unless something about your TileEntity changes the way you want to render it, but in a drastic way like rendering EntityItems inside the Block. I recommend BD Craft Cubik Pro though it cost about 11 dollars. So i Have something wrong with the models? I will look for it and tell you what happened. Ty for help ^^ You should be using the JSON model system, not the model system from back in 1.7.10 and down.
-
Shortly, how can i render my tile entity? You don't render your TileEntity you render your Block with the model system unless something about your TileEntity changes the way you want to render it, but in a drastic way like rendering EntityItems inside the Block. I recommend BD Craft Cubik Pro though it cost about 11 dollars.
-
[1.10.02] Overlay item texture on block texture
Animefan8888 replied to TrekkieCub314's topic in Modder Support
You want to render items aka "EntityItems" you will want to use a TESR i think as it will be dependant on what items are in there. I dont think much has changed in that aspect from 1.7 so look at examples of that and try to "replicate" that for 1.10.2. If you need anymore advice or direction ask away. -
TileEntitySpecialRenderer does not face the correct direction.
Animefan8888 replied to Raycoms's topic in Modder Support
GL11.rotatef(...) -
TileEntitySpecialRenderer does not face the correct direction.
Animefan8888 replied to Raycoms's topic in Modder Support
With the new block model system... -
Force player to face certain direction?
Animefan8888 replied to OnePoundPP's topic in Modder Support
Its not working at all, the player head is not turning. This code is handled client side. The if statement runs within a tickhandler class in which the other variables in the statement are set to false If I am not mistaken the server handles this data. -
It is actually this @Nullable public Item getItemDropped(IBlockState state, Random rand, int fortune) { returns NEItems.iridium } It is not a static method.
-
I think you guys might be overestimating the IRenderHandler class: public abstract class IRenderHandler { @SideOnly(Side.CLIENT) public abstract void render(float partialTicks, WorldClient world, Minecraft mc); } What I need is to override the renderSky() function in RenderGlobal: public void renderSky(float partialTicks, int pass) { net.minecraftforge.client.IRenderHandler renderer = this.theWorld.provider.getSkyRenderer(); if (renderer != null) { renderer.render(partialTicks, theWorld, mc); return; } if (this.mc.theWorld.provider.getDimensionType().getId() == 1) { this.renderSkyEnd(); } [...] } That being said, I could create an extension of RenderGlobal, and override this function so that it's called instead of the vanilla one. EDIT: Or maybe I should override the renderEndSky? Is that correct? Even if you override renderSky() or renderEndSky() how would you renderSky() get called will you also override the renderGlobal variable? Why would there be a call to IRenderHandler in RenderGlobal if it is not going to do anything?
-
[1.10.2][CLOSED]Creating Non Existing Blocks
Animefan8888 replied to Kaneka's topic in Modder Support
For the tesselator? Look at Gui#drawTexturedModelRect(...) sadly I do not have any for this specific "idea".