Everything posted by Selim_042
-
Force Block Update on Client
As part of my mod, I am using world.setBlockToAir, but it is not updating that the block is no longer there on the client. I run the server and connect two clients, one that initiates the method on which it works fine, but the other client still sees the block as there. I can still stand on it until the server kicks the client for "flying". I have already tried world.markAndNotifyBlock but I am guessing it isn't doing what I thought it would.
-
[1.9+] Store BlockState in NBT
Ok, I have it all sorted out. I am currently using block IDs temporary until I can figure out a good way of storing the block registry in NBT as it is a ResourceLocation and cannot be simply casted to a string for easy storage. Once I figure out how to store the registry, I will use that instead.
-
[1.9+] Store BlockState in NBT
Okay, I can store the block now, but I cannot figure out how to get the BlockState back from the ID and metadata. I can either the block from getBlockById, or the BlockState with getStateById, but I cannot figure out how to place that block in the world. The only method I can find is world.setBlockState, but that doesn't use the block ID.
-
[1.9+] Store BlockState in NBT
I was wondering if there is a simple way of storing a BlockState within an NBTTagCompound.
-
[1.8] Render Model from JSONObject
I think I am going to resort back to a TESR, thanks for the help though.
-
[1.8] Render Model from JSONObject
It is coming from a JSON string from ComputerCraft.
-
[1.8] Render Model from JSONObject
I have a JSONObject saved in the TileEntity. I was wondering if there is a way of rendering a model right from the JSONObject rather than using a model file or a TESR. Cause a JSON model file is just a serialized JSONObject right?
-
[1.8] Render Model from JSONObject
Is it easily possible to render a model taken right from the JSONObject rather than going from the JSON file? My end goal is to save a JSONObject to a TileEntity that will render that JSONObject as a model, without needing a TESR.
-
[Solved] [1.8.9] TileEntities have same NBT
Yup, I'm dumb. I had each field set as static. Thanks.
-
[Solved] [1.8.9] TileEntities have same NBT
I am attempting to create a ComputerCraft addon that has some peripherals in it, but my current issue is that each of my TileEntites all seem to have the same stored NBT data. Does this sound familiar to anyone else that they may just have a solution without me sharing my code?
-
[1.7.10] Change NBT on Craft
What I want to do is to combine two items, then the recipe returns one of them with a modified NBT tag. I can't seem to get it, but I do understand that it requires using the IRecipe interface. What I currently have is: http://pastebin.com/x7k8Bg8z
-
[1.7.10] Lore is not Cooperating
It works now. Yay!
-
[1.7.10] Lore is not Cooperating
It appears it is not being called.
-
[1.7.10] Lore is not Cooperating
It does not Override properly, asks where it wants to create a new method at, then lists all the Interfaces that my class implements. Might help to note that my item is a helmet, and extends the ItemArmor class rather than Item.
-
[1.7.10] Lore is not Cooperating
Well, that is looking at the NBT data of the item, and displaying lore dependant on what NBT is true. But, not even the "Modules:" text that should be displayed not caring about NBT doesn't show.
-
[1.7.10] Lore is not Cooperating
I have been trying to figure out my issue with my addInformation method for the past hour and a half or so, but I just can't figure it out. Nothing at all shows up for lore on the item. I am importing the java.util.List class, and this is my method: public void addInformation(ItemStack itemStack, EntityPlayer player, List list) { list.add("Modules:"); if (itemStack.stackTagCompound != null) { boolean gogglesOfRevealing = itemStack.stackTagCompound.getBoolean("gogglesOfRevealing"); if ((gogglesOfRevealing == true) && (LoadConfig.enableGogglesOfRevealing)) { list.add(" - Goggles of Revealing"); list.add(" " + EnumChatFormatting.DARK_PURPLE + "Vis discount: 5%"); } boolean terminalGlasses = itemStack.stackTagCompound.getBoolean("terminalGlasses"); if ((terminalGlasses == true) && (LoadConfig.enableTerminalGlasses)) { list.add(" - Terminal Glasses"); Long guid = extractGuid(itemStack); if (guid != null) list.add(" " + StatCollector.translateToLocalFormatted("openperipheral.misc.key", TerminalUtils.formatTerminalId(guid))); } boolean nightVision = itemStack.stackTagCompound.getBoolean("nightVision"); if (nightVision == true) { list.add(" - Night Vision"); } } }
IPS spam blocked by CleanTalk.