Everything posted by TheAwesomeGem
-
[1.12.2] Check when explosion ends?
Change block drop if there was explosion. I know there is an event for each explosion but how do I tag which explosion is which? I am using Chunk capability to store a list of affected blocks from an explosion. However whenever the tick interval ends, I don't know which explosion caused the block affected. So sometimes i clear the affected blocks before it even gets to the HarvestBlock event where I customize the block drop.
-
[1.12.2] Check when explosion ends?
Sadly, that's the way I am doing it but it's not working well if there are multiple explosions on top of each other. I wish there was a unique identifier for explosion. Thanks btw!
-
[1.12.2] Check when explosion ends?
So there are events to check before an explosion starts and before explosion affects blocks. How to check when an explosion is done(including all the calls to the HarvestDropEvent)? I need this to check if the block harvested was from an explosion or not. Basically I need a way to hook into this event: /** * Called when this Block is destroyed by an Explosion */ public void onBlockDestroyedByExplosion(World worldIn, BlockPos pos, Explosion explosionIn) { }
-
NBT What am I doing wrong?
You are not saving the PANELS tag.
-
NBT What am I doing wrong?
Show your writeToNBT method.
-
Block Facing direction isnt saved
Your facing value from getStateFromMeta doesn't take account of the Y axis. Do this @Override public IBlockState getStateFromMeta(int meta) { EnumFacing enumFacing = EnumFacing.getFront(meta); if (enumFacing.getAxis() == EnumFacing.Axis.Y) { enumFacing = EnumFacing.NORTH; } return this.getDefaultState().withProperty(FACING, enumFacing); } Also you should set default blockstate when a block gets added onto the world. @Override public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) { this.setDefaultFacing(worldIn, pos, state); }
-
[1.11.2] [Resolved] TileEntity without Fuel Issue
Also whenever you get ghost items, either you are not copying/cloning the itemstack properly, or you are using them only in clientside without syncing them.
-
Change Vanilla mobs size?
Are you changing it on clientside or serverside? Also use GLStateManager and not the raw GL calls. Edit: Look at RenderGiantZombie as an example.
-
Change Vanilla mobs size?
Scale using GL changes the position/origin as well. So you need to sort that out. You also need to update it's serverside bounding box. Use https://www.programcreek.com/java-api-examples/index.php?class=org.lwjgl.opengl.GL11&method=glTranslatef for changing position.
-
[1.12.2] How to design complex GUI with GUI Screen?
Yep digging deeper, it seems like Minecraft have no love for GUI. Even mods like refined storage and AE2 seems to use absolute positioning and a lot of headache inducing positional calculation. I will most likely switch to commands instead.
-
[1.12.2] How to design complex GUI with GUI Screen?
It's messy to look at the code. A lot of Configuration related stuff and stuff that makes no sense.
-
[1.12.2] How to design complex GUI with GUI Screen?
Is that how the Configuration GUI was done? Because it looks rather nice and properly size/aligned and all of that.
-
[1.12.2] How to design complex GUI with GUI Screen?
Thanks to you both. Looks like something that I would need. How do you place an element next to each other with offset? Like a label next to a textfield or a button next to another button. And do I need to keep a reference to each individual element?
-
[1.12.2] Does the event exist when the bait is bitten by fishing in the water?
You need to use onPlayerTick along with some reflection. I did something similar for my mod https://minecraft.curseforge.com/projects/better-fishing
-
[1.12.2] How to design complex GUI with GUI Screen?
The GUI I am trying to re-create: My questions are: How would I relatively position buttons and labels next to each other? (Right now, manually positioning each element with absolute value is painful and unintuitive) How would I add a listbox area that is scrollable? How to make sure that my GUI positioning is fine on different resolution? That's pretty much it.
-
[1.12.2] TileEntity doesn't sync to client.
I might have overlooked it. Will try it out and see if it works.
-
[1.12.2] TileEntity doesn't sync to client.
Aaah you mean detectAndSendChanges method? And that works without IInventory and the fields? Nice.
-
[1.12.2] TileEntity doesn't sync to client.
What way do you suggest? How to sync TileEntity GUI with the TileEntity?
-
[1.12.2] TileEntity doesn't sync to client.
Exactly. So I cannot use setFields. I though marking the block dirty after setting the cookTime would automatically update it due to the update packet function. But it does not.
-
[1.12.2] TileEntity doesn't sync to client.
Can I implement IInventory whilst also using IItemHandler. The way the furnace updates GUI is using the IInventory fields.
-
[1.12.2] TileEntity doesn't sync to client.
There is no such option for ItemHandler.
-
[1.12.2] TileEntity doesn't sync to client.
Yeah but Furnace Container uses IInventory and setField to update it.
-
[1.12.2] TileEntity doesn't sync to client.
The value cookTime on the client TileEntity is always 0. What am I doing wrong? TileEntityOven GuiOven
-
[1.12.2]How to make transferStackInSlot respect the a slot's item validation and item stack limit validation?
public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) How to make it so that the function that checks for shift clicking an item into a container checks for all the slot's validation? I don't want to retype the same code I do for each individual slot. Thanks!
-
[1.12.2] Custom smelting recipe that allows me to use NBT data?
Ugghh. Now I will have to make a tileentity, a new block, GUI, etc. oh well...
IPS spam blocked by CleanTalk.