Everything posted by 4pwnda
-
Remove reflection
Keep it short, I suggest adding a different way of handling the events as it now uses reflection. I think this would reduce the call time by the half. The javadoc about reflection suggests not to use it on runtime.
-
is this even possible?
World.getEntitiesInsideAABB <= something like that...
-
Grabbing all Blocks with one integer?
What's wrong with !=?
-
Proper way to read/write multi-part entity to/from NBT? [SOLVED]
Travel to the end in order to ask the Enderdragon, or just look in his java classes. It is he right?
-
Making blocks use HD textures.
I think if you make the texture file 2x larger (512x512) it will work.
-
Rotating a block
My problem is that when I rotate my block with my "wrench"-type item I've made it's sides texture come in the wrong order. This code doesn't work: @Override public int getBlockTextureFromSideAndMetadata(int side, int metadata) { int i = (metadata + side) % 6; return blockIndexInTexture + i; } , as I want the front and the back at the opposite sides. I want to have 1 texture for the front, the back and the sides each. Thanks in advance. EDIT: The block can be rotated in all 6 directions, not just 4.
-
Is there a way to get the path to the current worlds folder?
Thanks a lot for your answer. However I still got an error, and after printing the file path I saw it contained a folder called MpServer. So I check when that occurs and return null, works so I'm happy.
-
Those Field-Reading Reflection Blues
If you only want the user to add recipes I would suggest using XML or JSON rather than an configuration file, as deleting recipes would be more work.
-
[Need Modding Help] need help with displaying custom "ingame" gui tex [solved]
Easy, create a custom gui extending the class Gui, add a method that draws your stuff and call that method from a tickhandler.
-
GameREgistry.registerBlock() is @Deprecated
It's the Material class setRequiresTool().
-
tool durability
You can't save the item's damage in it's class, that why there is the ItemStack parameter. Instead in getDamageVsEntity get the itemstack the player is holding and it's damage.
-
Event for crafting
Already possible by implementing ICraftingHandler and registering it: @Override public void onCrafting(EntityPlayer player, ItemStack item, IInventory craftMatrix) { // TODO Auto-generated method stub for(int i=0; i<craftMatrix.getSizeInventory(); i++) { ItemStack itemstack = craftMatrix.getStackInSlot(i); if (itemstack != null && itemstack.getItem() == yourItem) { itemstack.damageItem(1, player); itemstack.stackSize++; } } }
-
What is Render?How to use a render?
Well in programming render means something that draws a model to the screen. For a custom model for a block I think you should use the method: ClientRegistry.bindTileEntitySpecialRenderer(tileEntityClass, specialRenderer);
-
Is there a way to get the path to the current worlds folder?
As the title says. This is the only thing I've found: world.getWorldInfo().getWorldName() , which only returns the worlds name. Thanks in advance.
IPS spam blocked by CleanTalk.