Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. 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.
  2. 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.
  3. Is there any documentation on IBakedModels or should I go mess around with them to figure out what they can do?
  4. 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.
  5. 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.
  6. 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.
  7. 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
  8. Is it only going to display certain Items for example Items.APPLE and Items.CARROT?
  9. 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?
  10. 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.
  11. Post your updated GUi, Container, and GuiHandler code. Even if it has not changed it will be easier to look at it.
  12. 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.
  13. 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?
  14. 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.
  15. 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.
  16. 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.
  17. 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.
  18. It is actually this @Nullable public Item getItemDropped(IBlockState state, Random rand, int fortune) { returns NEItems.iridium } It is not a static method.
  19. If you are using multiple projects you also need to right click on the forge project edit its build path and select all under order and export.
  20. 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?
  21. For the tesselator? Look at Gui#drawTexturedModelRect(...) sadly I do not have any for this specific "idea".
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.