Everything posted by Failender
-
[1.7.10] TileEntity Update
U are the guy :b
-
[1.7.10] TileEntity Update
normally detectAndSendChanges does that for you. This is from the vanilla Container code. /** * Looks for changes made in the container, sends them to every listener. */ public void detectAndSendChanges() { for (int i = 0; i < this.inventorySlots.size(); ++i) { ItemStack itemstack = ((Slot)this.inventorySlots.get(i)).getStack(); ItemStack itemstack1 = (ItemStack)this.inventoryItemStacks.get(i); if (!ItemStack.areItemStacksEqual(itemstack1, itemstack)) { itemstack1 = itemstack == null ? null : itemstack.copy(); this.inventoryItemStacks.set(i, itemstack1); for (int j = 0; j < this.crafters.size(); ++j) { ((ICrafting)this.crafters.get(j)).sendSlotContents(this, i, itemstack1); } } } } The super.addCraftingToCrafters should normally add the Crafter to the list so they gut updated
-
[1.7.10] TileEntity Update
u might find ur solution in ContainerFurnace, look at the call there in addCraftingToCrafters, maybe it can help you
-
[1.7.10] TileEntity Update
Then they changed something there from 1.8 to 1.7 I have no idea then sorry
-
[1.7.10] TileEntity Update
wrong function then that explains it. u want a function with the args Container and IInventory . this is the obfuscated one in 1.8 void func_175173_a(Container p_175173_1_, IInventory p_175173_2_);
-
[1.7.10] TileEntity Update
Not the kind of thing where I am pro at but.. I think u dont need to call this.getInventory, u need to add machine there, which means the call could be p_75132_1_.sendContainerAndContentsToPlayer(this, machine); If this doesnt helps im clueless, sorry
-
Connecting two Blocks
you can do a save in the CommonProxy or use IExtendedPlayerProperties
-
[1.7.10] TileEntity Update
Okay I am not 100% sure about this. I took this code from a custom smelter of mine. I think (think im not sure) that the addCraftingToCrafters is a way to tell Minecraft "look on this inventory, if something changes please inform the client" , so I guess u are not adding ur inventory to a listener, which means no1 is syncing client and server. @Override public void addCraftingToCrafters(ICrafting listener) { // TODO Auto-generated method stub super.addCraftingToCrafters(listener); listener.func_175173_a(this, smelter.inventory); }
-
Connecting two Blocks
thats a terrible idea to be honest. ClientProxy is for Client Stuff, checking which TE's are to get connected should be a decision made on server side, so u cant hack.
-
[SOLVED][1.7.10] - Player max health AttributeModifier
CloneEvent is enabled in 1.7? Damn I thought it was 1.8 only good to know
-
Connecting two Blocks
u could save the x,y,z position of the te in the nbt and then get the te if u need it via world.getTileEntity
-
Connecting two Blocks
dont save the lastclicked inside the item. u need to use nbt for that, bc everything inside the item class is shared for all items.
-
[SOLVED][1.7.10] - Player max health AttributeModifier
One solution is to save the amount of hp the player should have and reasign it in EntityConstruct event, since there is a new EntityPlayer created every time the player dies
-
I want to write String save in box.
MyTileEntity te = (MyTileEntity) world.getTileEntity(x,y,z) (for 1.8 use BlockPos instead of x,y,z)
-
I want to write String save in box.
http://lmgtfy.com/?q=minecraft+forge+tileentity
-
I want to write String save in box.
this code is a total mess. you should better delete it and hope noone will ever find it again. The method u are seeking is onBlockPlaced, it gives you an EntityLivingBase where u can get the players name from. If u call setBlockUnbreakable u will set ALL of your blocks unbreakable, because the Block class is for EVERY SINGE BLOCK of that block placed. if you want them to be different you need to use a TileEntity
-
[1.7.10] Change item after certain period.
You cant change them anywhere. E.g. chests bc u cant get the container of an iotem from the item
-
[1.7.10] How to change so dirt and sand doesn't drop without using a tool
Math.random
-
[1.7.10] Change item after certain period.
Correct me if Im wrong, but they dont go up inside chests
-
[1.8 - Forge] - How to check for event then deny it
To see which event types there are use ur ide. it is easy to find it. then check which one ios the one u desire
-
[1.8 - Forge] - How to check for event then deny it
I dont know if the event is cancelable, but if it is u can do event.setCancelled(true) EDIT: Plot Twist: Its not cancelable https://dl.dropboxusercontent.com/s/h777x7ugherqs0w/forgeevents.html
-
[1.7.10] Change item after certain period.
to make this short: u cant.
-
[1.7.10] Change item after certain period.
http://www.minecraftforge.net/forum/index.php/topic,33145.0.html Mainly the same, u just need to exchange destruciton by changing
-
[1.7.10] How to change so dirt and sand doesn't drop without using a tool
use HarvestDrops event, if the harvesting player has no tool equipped clear the drops list
-
How to make hands do no damage to blocks
http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571567-forge-1-6-4-1-8-eventhandler-and
IPS spam blocked by CleanTalk.