Jump to content

TheAwesomeGem

Members
  • Posts

    82
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    Life gives you onions and you lick it.

Recent Profile Visitors

2700 profile views

TheAwesomeGem's Achievements

Stone Miner

Stone Miner (3/8)

2

Reputation

  1. 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.
  2. 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!
  3. 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) { }
  4. 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); }
  5. 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.
  6. Are you changing it on clientside or serverside? Also use GLStateManager and not the raw GL calls. Edit: Look at RenderGiantZombie as an example.
  7. 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.
  8. 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.
  9. It's messy to look at the code. A lot of Configuration related stuff and stuff that makes no sense.
  10. Is that how the Configuration GUI was done? Because it looks rather nice and properly size/aligned and all of that.
  11. 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?
  12. You need to use onPlayerTick along with some reflection. I did something similar for my mod https://minecraft.curseforge.com/projects/better-fishing
  13. 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.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.