-
Posts
82 -
Joined
-
Last visited
Everything posted by TheAwesomeGem
-
[1.12.2] Check when explosion ends?
TheAwesomeGem replied to TheAwesomeGem's topic in Modder Support
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?
TheAwesomeGem replied to TheAwesomeGem's topic in Modder Support
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! -
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) { }
-
You are not saving the PANELS tag.
-
Show your writeToNBT method.
-
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
TheAwesomeGem replied to coolsim's topic in Modder Support
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. -
Are you changing it on clientside or serverside? Also use GLStateManager and not the raw GL calls. Edit: Look at RenderGiantZombie as an example.
-
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?
TheAwesomeGem replied to TheAwesomeGem's topic in Modder Support
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?
TheAwesomeGem replied to TheAwesomeGem's topic in Modder Support
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?
TheAwesomeGem replied to TheAwesomeGem's topic in Modder Support
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?
TheAwesomeGem replied to TheAwesomeGem's topic in Modder Support
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? -
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.
TheAwesomeGem replied to TheAwesomeGem's topic in Modder Support
I might have overlooked it. Will try it out and see if it works. -
[1.12.2] TileEntity doesn't sync to client.
TheAwesomeGem replied to TheAwesomeGem's topic in Modder Support
Aaah you mean detectAndSendChanges method? And that works without IInventory and the fields? Nice. -
[1.12.2] TileEntity doesn't sync to client.
TheAwesomeGem replied to TheAwesomeGem's topic in Modder Support
What way do you suggest? How to sync TileEntity GUI with the TileEntity? -
[1.12.2] TileEntity doesn't sync to client.
TheAwesomeGem replied to TheAwesomeGem's topic in Modder Support
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.
TheAwesomeGem replied to TheAwesomeGem's topic in Modder Support
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.
TheAwesomeGem replied to TheAwesomeGem's topic in Modder Support
There is no such option for ItemHandler. -
[1.12.2] TileEntity doesn't sync to client.
TheAwesomeGem replied to TheAwesomeGem's topic in Modder Support
Yeah but Furnace Container uses IInventory and setField to update it. -
The value cookTime on the client TileEntity is always 0. What am I doing wrong? TileEntityOven GuiOven