Skip to content

Commit

Permalink
Mine bombs: Minor adjustments.
Browse files Browse the repository at this point in the history
There still are changes that are needed, but I'm needing to post a new alpha release before I proceed to wrap up the mine bombs.
They are getting very close to working as intended, and I'm wanting to add more features to the bombs, along with changing a few other things too.
But for now, a new alpha needs to be pushed out because other issues have been addressed and fixed.
  • Loading branch information
rbluer committed Aug 27, 2024
1 parent f776660 commit a8b5509
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 14 deletions.
7 changes: 7 additions & 0 deletions docs/changelog_v3.3.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ These change logs represent the work that has been going on within prison.
# 3.3.0-beta.18c 2024-08-27


* **Mine bombs: Minor adjustments.**
There still are changes that are needed, but I'm needing to post a new alpha release before I proceed to wrap up the mine bombs.
They are getting very close to working as intended, and I'm wanting to add more features to the bombs, along with changing a few other things too.
But for now, a new alpha needs to be pushed out because other issues have been addressed and fixed.



* **Material validations: The validation process was generating a ton of warnings for all items and blocks that exist in minecraft, but yet cannot exist in an item stack.** Such as wall hangings, water, etc... since they are fixed in the world, and when in itemstacks, they are represented by something else, such as an ItemFrame or a Bucket of Water.
I eliminated most errors, but reduced it down to a list of items. Also starting to suppress items that are known not to be ItemStack-able so the list is greatly reduced. Still need to work on suppressing others too.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void animatorFactory(
yaw, pitch );

ba.setAlternateDirections( true );
ba.setRadiusDelta( 1.0 );
ba.setRadiusDelta( 2.0 );

getAnimators().add( ba );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ public ExplosiveBlockBreakEvent( Block theBlock, Player player,

this.explodedBlocks = explodedBlocks;
this.triggeredBy = triggeredBy;

this.setCancelled( false );
}
public ExplosiveBlockBreakEvent( Block theBlock, Player player,
List<Block> explodedBlocks ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,22 +390,29 @@ private String checkMineBombItemStack( ItemStack iStack ) {
// NOTE: Because we're just checking, do not auto update the itemstack.
// NBTItem nbtItem = new NBTItem( event.getItem() );

String bombName = PrisonNBTUtil.getNBTString( iStack, MineBombs.MINE_BOMBS_NBT_KEY );
// String ownerUUID = PrisonNBTUtil.getNBTString( iStack, MineBombs.MINE_BOMBS_NBT_OWNER_UUID );
String bombName = null;

if ( bombName != null && bombName.trim().length() == 0 ) {
bombName = null;
}
else if ( bombName != null ){
try {
bombName = PrisonNBTUtil.getNBTString( iStack, MineBombs.MINE_BOMBS_NBT_KEY );
// String ownerUUID = PrisonNBTUtil.getNBTString( iStack, MineBombs.MINE_BOMBS_NBT_OWNER_UUID );

// if ( Output.get().isDebug() ) {
// Output.get().logInfo( "PrisonBombListener.onInteract (item) "
// + "bombName: &7%s&r &3:: nbt: &r\\Q%s\\E",
// bombName,
// PrisonNBTUtil.nbtDebugString( iStack ).replace("%", "_")
//// (nbtItem == null ? "&a-no-nbt-" : nbtItem.toString())
// );
if ( bombName != null && bombName.trim().length() == 0 ) {
bombName = null;
}
// else if ( bombName != null ) {
//
// // if ( Output.get().isDebug() ) {
// // Output.get().logInfo( "PrisonBombListener.onInteract (item) "
// // + "bombName: &7%s&r &3:: nbt: &r\\Q%s\\E",
// // bombName,
// // PrisonNBTUtil.nbtDebugString( iStack ).replace("%", "_")
// //// (nbtItem == null ? "&a-no-nbt-" : nbtItem.toString())
// // );
// // }
// }
}
catch (Exception e) {
// Ignore... not a mine bomb.
}


Expand Down

0 comments on commit a8b5509

Please sign in to comment.