opssemnik
-
Posts
269 -
Joined
-
Last visited
Posts posted by opssemnik
-
-
just a bit of hijack(sorry), but i use asm to replace items, blocks and remove some entities,while i do a bunch of sanity checks, can it still corrupt worlds? if so, do i need to hook the world load/save events and make backups of the world? thanks
edit:
its just me or this guy decompiled a mod using JAD? (hence line numbers and obfuscated names)
-
post you start.bat?(not as attachament, copy and paste the code)
-
since im fan of asm, I would hook the on click method and do some checks, however I bet its not the most optimal / easy way. maybe a tickhandler with side client and type player would also work(also I bet its the best way)
-
the id didn´t got removed from nbt tag. use a nbt editor and remove the item from world
-
tickhandler, side server and type world?
-
i don't make mods for a while, so i don´t know if you can do that, but doesn't he can make the block spawn an entity(no render or something like that), or use a tileentity, to keep searching for entities near the block, then its way?
-
onItemUse is proof to this
-
if you go to the mods tab your modID is always there?
-
didnt want this but ok, thanks for clarifying
LexManos replied to one of my threads O_o
-
at breezertwo.morerecipes.src.Grinder.onBlockActivated(Grinder.java:121) ~[Grinder.class:?]
gui not crashing
-
bump
-
2 of his classes were using client thing on server side, he was checking with a worldclient instance to see if was instancieded to worldserver
so 99% sure that he does other bad things so i just showed him the most easy way '-'
-
oh yeah also could ^^^, post your full code please.(funny fact i got that error back in 1.4 because of the reason ^^ said, how could i forget lol)
-
why are you adding 2 slots with the tileentity object and rest(except for playerinv ofc) with the inventory object?
shouldn´t all be tileentity (except for player one)?
-
yeah and looking now, i think you will need to set the stackSize after putting back on the player inventory.if my code dosent work try this way.
-
public boolean placeBook(EntityPlayer entityPlayer, TileEntityDesk tileEntityDesk) { ItemStack book = entityPlayer.getHeldItem(); if(book != null) { Item bookTest = book.getItem(); if(bookTest instanceof ItemBook) { int bookReturn = tileEntityDesk.addBook(book); if(bookReturn == 0) { entityPlayer.inventory.mainInventory[entityPlayer.inventory.currentItem] = null; } if(bookReturn > 0) { entityPlayer.inventory.mainInventory[entityPlayer.inventory.currentItem] = book; return true; } } } return false; }
TO
public boolean placeBook(EntityPlayer entityPlayer, TileEntityDesk tileEntityDesk) { ItemStack book = entityPlayer.getHeldItem(); int stackSZ =0; if(book != null) { stackSZ = book.stackSize; Item bookTest = book.getItem(); if(bookTest instanceof ItemBook) { int bookReturn = tileEntityDesk.addBook(book); if(bookReturn == 0) { entityPlayer.inventory.mainInventory[entityPlayer.inventory.currentItem] = null; } if(bookReturn > 0) { book.stackSize = stackSZ-1; entityPlayer.inventory.mainInventory[entityPlayer.inventory.currentItem] = book; return true; } } } return false; }
-
My Bad
change the moving object position to
MovingObjectPosition m = Minecraft.getMinecraft().objectMouseOver;
-
i know can be a bit crazy but can you put a model = AdvancedModelLoader.loadModel(new ResourceLocation("strongholdcraft:models/eggStand.obj"));
on the 1st line of renderWorldBlock
?
-
1st: change topic name, your mod is not crashing
2nd: tell me if i got it right, you want to when a player insert a book on the block, but the block is already full, you want the block to drop all items + the overflowed item that the player placed in?
-
TileEntity tile_entity = world.getTileEntity(x, y, z);
->
TileEntityGrinder tile_entity = (TileEntityGrinder)world.getTileEntity(x, y, z);
-
Tip: if you have problems that you cant solve, and inolves inventory stuff, just look iron chest source on cpw´s github, if the problem is new names, just look at commits and see what cpw has changed.
(i wouldn´t recommend minecraft because you did this thread as you couldn´t look at minecraft source correctly, so using the iron chest one is more easier because of the commits)
-
minecraft:font/glyph_sizes.bin
assets errror, just copy and paste assets folder from your minecraft to the one in the forge src
-
just put System.out.println("My Ore was Generated"); on the gen code, if u want to make it more debugger, just put the x y z cordinates on that phrase
-
MovingObjectPosition m = new MovingObjectPosition(e.entityPlayer);
if(!e.entityPlayer.worldOb.isRemote && (e.entityPlayer.worldObj.getBlock(m.blockX, m.blockY, m.blockZ) == Block.furnaceIdle ||e.entityPlayer.worldObj.getBlock(m.blockX, m.blockY, m.blockZ) == Block.furnaceActivated)){
//do your stuff
}
Edit if you want a smp mod..., send the messages on the furnace destroy event, the same way as i told you to use on the interact event.....
[1.7.10] [SOLVED] Replace any class vanilla without the use of forge.
in Modder Support
Posted
remove it from Blocks.class would be too much hasle, you could just hook the method that makes the block portal (i dont remember if its block obsidian or item flint and steel).
I have a old utility class that i done back in 1.3 that replaces classes at runtime (all of it, not just one), i could send for you to take a look, but it would be better to look if forge already provides hook for that, or if use asm, replace just the method itself, not the whole class