Mixin update
This commit is contained in:
parent
1b4757399c
commit
2441a059e1
2 changed files with 10 additions and 8 deletions
|
@ -8,7 +8,7 @@
|
|||
loader_version=0.10.8
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 0.7.1-beta
|
||||
mod_version = 0.7.2-beta
|
||||
maven_group = ru.betterend
|
||||
archives_base_name = better-end
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import ru.betterend.util.MHelper;
|
|||
public class BiomeColorsMixin {
|
||||
private static final int POISON_COLOR = MHelper.color(92, 160, 78);
|
||||
|
||||
@Inject(method = "getWaterColor", at = @At("HEAD"), cancellable = true)
|
||||
@Inject(method = "getWaterColor", at = @At("RETURN"), cancellable = true)
|
||||
private static void beGetWaterColor(BlockRenderView world, BlockPos pos, CallbackInfoReturnable<Integer> info) {
|
||||
int x1 = pos.getX() - 1;
|
||||
int y1 = pos.getY() - 1;
|
||||
|
@ -25,19 +25,21 @@ public class BiomeColorsMixin {
|
|||
int y2 = pos.getY() + 2;
|
||||
int z2 = pos.getZ() + 2;
|
||||
Mutable mut = new Mutable();
|
||||
for (int x = x1; x < x2; x++) {
|
||||
int color = info.getReturnValue();
|
||||
boolean cont = true;
|
||||
for (int x = x1; x < x2 && cont; x++) {
|
||||
mut.setX(x);
|
||||
for (int y = y1; y < y2; y++) {
|
||||
for (int y = y1; y < y2 && cont; y++) {
|
||||
mut.setY(y);
|
||||
for (int z = z1; z < z2; z++) {
|
||||
for (int z = z1; z < z2 && cont; z++) {
|
||||
mut.setZ(z);
|
||||
if (world.getBlockState(mut).isOf(EndBlocks.BRIMSTONE)) {
|
||||
info.setReturnValue(POISON_COLOR);
|
||||
info.cancel();
|
||||
return;
|
||||
color = POISON_COLOR;
|
||||
cont = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
info.setReturnValue(color);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue