Skip to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Animefan8888

Forge Modder
  • Joined

  • Last visited

Everything posted by Animefan8888

  1. 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.
  2. 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
  3. Is it only going to display certain Items for example Items.APPLE and Items.CARROT?
  4. 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?
  5. if (storedItem != null) //Write Item to NBT.
  6. 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.
  7. Post your updated GUi, Container, and GuiHandler code. Even if it has not changed it will be easier to look at it.
  8. 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.
  9. 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?
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. It is actually this @Nullable public Item getItemDropped(IBlockState state, Random rand, int fortune) { returns NEItems.iridium } It is not a static method.
  15. 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.
  16. 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?
  17. For the tesselator? Look at Gui#drawTexturedModelRect(...) sadly I do not have any for this specific "idea".
  18. If you added the Items to a map of <Item, Item> where the first one was the original and the later one was the replacement you could just loop through that list to compare items. Then if the Items matched you would your replacement for the original item right there. Though that is only really useful if you have lets say 10+ plus replacements. And of course you could do the same for Blocks. *Edit Correction you could just use map.contains(item) then if true do the replacement. No need for a for loop.
  19. It works! I had already added the line idea{module{inheritOutputDirs = true}} but I didn't run again the ./gradlew setupDecompWorkspace. thanks for your help! Is that not step 2?
  20. Ok is the Item damagable? Post the whole class please.
  21. I did not understand your answer. I followed this guide that are in the README.txt file: at the step 3 the underlined and bold text I cannot import the file. I have just launch the gradlew program with arg --info and in the outputs I found that error: file or directory '/Users/noemurr/Downloads/forge-1.10.2-12.18.1.2011-mdk/src/api/resources', not found I think that it is important but I don't know I to resolve the problem. Are you sure you did steps 1/2?
  22. I may be an idiot that doesn't use IneliJ but I'm pretty sure you do not import the build.gradle project... I was indeed an idiot...
  23. You never set it to be anything other than 0...

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.