Skip to content

Commit

Permalink
Regenerate patches, update EXC
Browse files Browse the repository at this point in the history
  • Loading branch information
XFactHD committed Nov 4, 2023
1 parent e1b200a commit 2d03590
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 30 deletions.
49 changes: 22 additions & 27 deletions patches/net/minecraft/world/level/block/FireBlock.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@
- this.checkBurnOut(p_221161_, p_221162_.above(), 250 + k, p_221163_, i);
- this.checkBurnOut(p_221161_, p_221162_.north(), 300 + k, p_221163_, i);
- this.checkBurnOut(p_221161_, p_221162_.south(), 300 + k, p_221163_, i);
+ this.tryCatchFire(p_221161_, p_221162_.east(), 300 + k, p_221163_, i, Direction.WEST);
+ this.tryCatchFire(p_221161_, p_221162_.west(), 300 + k, p_221163_, i, Direction.EAST);
+ this.tryCatchFire(p_221161_, p_221162_.below(), 250 + k, p_221163_, i, Direction.UP);
+ this.tryCatchFire(p_221161_, p_221162_.above(), 250 + k, p_221163_, i, Direction.DOWN);
+ this.tryCatchFire(p_221161_, p_221162_.north(), 300 + k, p_221163_, i, Direction.SOUTH);
+ this.tryCatchFire(p_221161_, p_221162_.south(), 300 + k, p_221163_, i, Direction.NORTH);
+ this.checkBurnOut(p_221161_, p_221162_.east(), 300 + k, p_221163_, i, Direction.WEST);
+ this.checkBurnOut(p_221161_, p_221162_.west(), 300 + k, p_221163_, i, Direction.EAST);
+ this.checkBurnOut(p_221161_, p_221162_.below(), 250 + k, p_221163_, i, Direction.UP);
+ this.checkBurnOut(p_221161_, p_221162_.above(), 250 + k, p_221163_, i, Direction.DOWN);
+ this.checkBurnOut(p_221161_, p_221162_.north(), 300 + k, p_221163_, i, Direction.SOUTH);
+ this.checkBurnOut(p_221161_, p_221162_.south(), 300 + k, p_221163_, i, Direction.NORTH);
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();

for(int l = -1; l <= 1; ++l) {
@@ -229,32 +_,31 @@
@@ -229,33 +_,32 @@
|| p_53429_.isRainingAt(p_53430_.south());
}

Expand All @@ -81,31 +81,26 @@

- private void checkBurnOut(Level p_221151_, BlockPos p_221152_, int p_221153_, RandomSource p_221154_, int p_221155_) {
- int i = this.getBurnOdds(p_221151_.getBlockState(p_221152_));
- if (p_221154_.nextInt(p_221153_) < i) {
- BlockState blockstate = p_221151_.getBlockState(p_221152_);
- if (p_221154_.nextInt(p_221155_ + 10) < 5 && !p_221151_.isRainingAt(p_221152_)) {
- int j = Math.min(p_221155_ + p_221154_.nextInt(5) / 4, 15);
- p_221151_.setBlock(p_221152_, this.getStateWithAge(p_221151_, p_221152_, j), 3);
- } else {
- p_221151_.removeBlock(p_221152_, false);
- }
+ private void tryCatchFire(Level p_53432_, BlockPos p_53433_, int p_53434_, RandomSource p_53435_, int p_53436_, Direction face) {
+ int i = p_53432_.getBlockState(p_53433_).getFlammability(p_53432_, p_53433_, face);
+ if (p_53435_.nextInt(p_53434_) < i) {
+ BlockState blockstate = p_53432_.getBlockState(p_53433_);
+ blockstate.onCaughtFire(p_53432_, p_53433_, face, null);

+ private void checkBurnOut(Level p_221151_, BlockPos p_221152_, int p_221153_, RandomSource p_221154_, int p_221155_, Direction face) {
+ int i = p_221151_.getBlockState(p_221152_).getFlammability(p_221151_, p_221152_, face);
if (p_221154_.nextInt(p_221153_) < i) {
BlockState blockstate = p_221151_.getBlockState(p_221152_);
+ blockstate.onCaughtFire(p_221151_, p_221152_, face, null);
+
if (p_221154_.nextInt(p_221155_ + 10) < 5 && !p_221151_.isRainingAt(p_221152_)) {
int j = Math.min(p_221155_ + p_221154_.nextInt(5) / 4, 15);
p_221151_.setBlock(p_221152_, this.getStateWithAge(p_221151_, p_221152_, j), 3);
} else {
p_221151_.removeBlock(p_221152_, false);
}
-
- Block block = blockstate.getBlock();
- if (block instanceof TntBlock) {
- TntBlock.explode(p_221151_, p_221152_);
+ if (p_53435_.nextInt(p_53434_ + 10) < 5 && !p_53432_.isRainingAt(p_53433_)) {
+ int j = Math.min(p_53434_ + p_53435_.nextInt(5) / 4, 15);
+ p_53432_.setBlock(p_53433_, this.getStateWithAge(p_53432_, p_53433_, j), 3);
+ } else {
+ p_53432_.removeBlock(p_53433_, false);
}
- }
}
}

@@ -266,7 +_,7 @@

private boolean isValidFireLocation(BlockGetter p_53486_, BlockPos p_53487_) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
}
}
@@ -111,20 +_,26 @@
@@ -111,20 +_,30 @@

private boolean hasFlammableNeighbours(LevelReader p_76228_, BlockPos p_76229_) {
for(Direction direction : Direction.values()) {
Expand All @@ -43,7 +43,11 @@
}

+ private boolean isFlammable(LevelReader level, BlockPos pos, Direction face) {
+ return pos.getY() >= level.getMinBuildHeight() && pos.getY() < level.getMaxBuildHeight() && !level.hasChunkAt(pos) ? false : level.getBlockState(pos).isFlammable(level, pos, face);
+ if (pos.getY() >= level.getMinBuildHeight() && pos.getY() < level.getMaxBuildHeight() && !level.hasChunkAt(pos)) {
+ return false;
+ }
+ BlockState state = level.getBlockState(pos);
+ return state.ignitedByLava() && state.isFlammable(level, pos, face);
+ }
+
@Nullable
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/forge.exc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ net/minecraft/world/level/NaturalSpawner.canSpawnAtBody(Lnet/minecraft/world/ent
net/minecraft/world/level/block/Block.dropResources(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/entity/BlockEntity;Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/item/ItemStack;Z)V=|p_49882_,p_49883_,p_49884_,p_49885_,p_49886_,p_49887_,dropXp
net/minecraft/world/level/block/ConcretePowderBlock.shouldSolidify(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/material/FluidState;)Z=|p_52081_,p_52082_,p_52083_,fluidState
net/minecraft/world/level/block/ConcretePowderBlock.touchesLiquid(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;)Z=|p_52065_,p_52066_,state
net/minecraft/world/level/block/FireBlock.tryCatchFire(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;ILnet/minecraft/util/RandomSource;ILnet/minecraft/core/Direction;)V=|p_53432_,p_53433_,p_53434_,p_53435_,p_53436_,face
net/minecraft/world/level/block/FireBlock.checkBurnOut(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;ILnet/minecraft/util/RandomSource;ILnet/minecraft/core/Direction;)V=|p_221151_,p_221152_,p_221153_,p_221154_,p_221155_,face
net/minecraft/world/level/block/FlowerBlock.<init>(Ljava/util/function/Supplier;ILnet/minecraft/world/level/block/state/BlockBehaviour$Properties;)V=|effectSupplier,p_53513_,p_53514_
net/minecraft/world/level/block/FlowerPotBlock.<init>(Ljava/util/function/Supplier;Ljava/util/function/Supplier;Lnet/minecraft/world/level/block/state/BlockBehaviour$Properties;)V=|emptyPot,p_53528_,properties
net/minecraft/world/level/block/LiquidBlock.<init>(Ljava/util/function/Supplier;Lnet/minecraft/world/level/block/state/BlockBehaviour$Properties;)V=|fluid,p_54695_
Expand Down

0 comments on commit 2d03590

Please sign in to comment.