
UntouchedWagons
Members-
Posts
156 -
Joined
-
Last visited
Everything posted by UntouchedWagons
-
I'm porting a mod from 1.6.4 to 1.7.10 that uses the Redstone Flux API. It's more or less done but for some reason the tile entity client-side doesn't seem to be updated whenever the tile entity server-side receives energy. Do I need to call markDirty every time it receives energy or am I missing something else? Here is the repository: https://github.com/UntouchedWagons/OpenModularTurrets Here is the code for the TileEntity class: https://github.com/UntouchedWagons/OpenModularTurrets/blob/master/src/main/java/modularTurrets/tileentity/turretBase/TurretBase.java Current build can be found here: http://untouchedwagons.com:8080/job/OpenModularTurrets/
-
I hardly consider posting in a thread that hasn't had a post for 10 days to be necrobumping. Relavent XKCD Yeah I mostly figured it out by looking at forestry's code. GUIs in minecraft could be a bit more intuitive
-
What did you do? I want to implement the same feature in my mod.
-
I know the TileEntity renderer works. The way the original author wrote it, when you put an item in to sell, the TileEntity renderer will render the item inside the block (the vending machine looks not unlike a glass cookie jar) as if you simply dropped the item on the ground. When I put an item in, the item does show up. I put an "FMLLog.info" bit at the beginning of each method of the ISBRH class that does render stuff (drawBlock, renderInventoryBlock, and renderWorldBlock) and I saw "renderInventoryBlock" and "drawBlock" spammed to the console. So that tells me it's doing stuff, just not the right stuff.
-
[1.7.10] Can I use Thermal Expansion Pulverizer recipes?
UntouchedWagons replied to Ddogclaw's topic in Modder Support
You can access them via Reflection, you'd have to decompile the mod though to figure out what you need to reflect into. -
I'm working on porting a mod from 1.6.4 to 1.7.10 and I finally got it to compile (after rewriting all the packet stuff and whatnot) but the blocks aren't rendering properly. I really don't understand how OpenGL and all the rendering stuff works so it could very well be something I broke porting the mod. Picture: http://i.imgur.com/R9uGk30.png All the code for the mod can be found on my github account Tile Entity class: code Tile Entity Render: code
-
In the Item class' getItemStackDisplayName method it calls StatCollector's translateToLocal method but there's no reference to the mod that the item is from. So if two mods add an item with the same unlocalized name, how does Minecraft know which item.the_thing.name to use? Also, is it possible to get the display name of an item using only the mod id and the unlocalized name?
-
When I started this thread, it didn't occur to me that the getDisplayName method would be client-side only. It makes sense. However even if I try to get the display name of a brewing stand in a ClientProxy, I still get a NullPointerException: package untouchedwagons.minecraft.sandbox; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLPostInitializationEvent; @Mod(modid = "sandbox", name = "Sandbox", version = "1.0.0", dependencies = "required-after:FML") public class Sandbox { @SidedProxy(clientSide = "untouchedwagons.minecraft.sandbox.ClientProxy", serverSide = "untouchedwagons.minecraft.sandbox.CommonProxy") public static CommonProxy proxy; @Mod.EventHandler public void postInit(FMLPostInitializationEvent event) { proxy.doTheNeedful(); } } package untouchedwagons.minecraft.sandbox; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; public class ClientProxy extends CommonProxy { @Override public void doTheNeedful() { ItemStack brewing_stand = new ItemStack(Blocks.brewing_stand); brewing_stand.getDisplayName(); } } Maybe because I passed a block into the ItemStack's constructor? Do I need to do something different to get the localized name of a block?
-
package untouchedwagons.minecraft.sandbox; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.event.FMLInitializationEvent; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; @Mod(modid = "sandbox", name = "Sandbox", version = "1.0.0", dependencies = "required-after:FML") public class Sandbox { @Mod.EventHandler public void load(FMLInitializationEvent event) { ItemStack brewing_stand = new ItemStack(Blocks.brewing_stand); brewing_stand.getDisplayName(); } } Throws a NullPointerException: java.lang.NullPointerException: Initializing game at net.minecraft.item.ItemStack.func_82833_r(ItemStack.java:426) at untouchedwagons.minecraft.sandbox.Sandbox.load(Sandbox.java:25)
-
So what's this block state stuff all about? It replaces the meta data stuff I guess.
-
Unnamed Method in Item.Class, What does it do?
UntouchedWagons replied to killer380's topic in Modder Support
If you do a search in that class, you'll see that it's referenced in the getDigSpeed method so it probably has to do with mining speed. If you look at the ItemPickaxe class, you'll see that it overrides the func_150893_a method in ItemTool which overrides that method in the Item class. -
I want to check if the result of a crafting recipe is a block (planks, gold blocks, etc...) rather than an item. Is this the right way to check? ItemStack result = recipe.getRecipeOutput(); Block result_block = Block.getBlockFromItem(result .getItem()); if (result_block != null) System.out.println("Yup the result is a block"); Likewise if I want to check if the result is an Item (fish, diamond sword, etc...): ItemStack result = recipe.getRecipeOutput(); Item result_item = Item.getItemById(Item.getIdFromItem(result.getItem())); if (result_item != null) System.out.println("Yup the result is an item"); Is this right?
-
Is there a limit to how big an NBTTagList can be?
UntouchedWagons replied to jotato's topic in Modder Support
A while back there was a user on /r/feedthebeast who made a thread warning others not to store too much stuff on a single Applied Energistics disk. Apparently the NBT data got so big that it corrupted his world or something like that. 200,000 slots might be a bit much for one NBT structure unless you 'partition' the chest into several smaller chunks and save each chunk in its own file but present all the chunks as a single inventory. -
I'm trying to learn to use git after having used mercurial for ~2 years and I found this cheatsheet to help a bit.
-
Cool. I was looking at your tutorial and I saw there's events for the server starting and stopping but is there an event for the game (client-side) shutting down? I want to have a built-in HTTP server using netty and I want it running as long as the player has Minecraft running, not necessarily connected to a server.