This commit is contained in:
parent
24b69d5150
commit
3d7df7742d
@ -55,9 +55,10 @@ public class IndustrialLaserBlockEntity extends FieldProjectorBlockEntity {
|
|||||||
TntBlock.primeTnt(getWorld(), targetPos);
|
TntBlock.primeTnt(getWorld(), targetPos);
|
||||||
getWorld().setBlockState(targetPos, Blocks.AIR.getDefaultState());
|
getWorld().setBlockState(targetPos, Blocks.AIR.getDefaultState());
|
||||||
|
|
||||||
progress = 0;
|
if (progress != 0) {
|
||||||
|
progress = 0;
|
||||||
markDirty();
|
markDirty();
|
||||||
|
}
|
||||||
} else if (IndustrialLaserRegistry.has(targetState.getBlock())) {
|
} else if (IndustrialLaserRegistry.has(targetState.getBlock())) {
|
||||||
if (progress >= HardcodedConfig.INDUSTRIAL_LASER_BEAM_TIME) {
|
if (progress >= HardcodedConfig.INDUSTRIAL_LASER_BEAM_TIME) {
|
||||||
getWorld().createExplosion(null, targetPos.getX() + 0.5d, targetPos.getY() + 0.5d, targetPos.getZ() + 0.5d, 0.5f, Explosion.DestructionType.NONE);
|
getWorld().createExplosion(null, targetPos.getX() + 0.5d, targetPos.getY() + 0.5d, targetPos.getZ() + 0.5d, 0.5f, Explosion.DestructionType.NONE);
|
||||||
|
@ -202,8 +202,8 @@ public class NetworkComponent extends PersistentState {
|
|||||||
Entry entry = getOrCreate(id);
|
Entry entry = getOrCreate(id);
|
||||||
if (!entry.sources.contains(pos)) {
|
if (!entry.sources.contains(pos)) {
|
||||||
entry.sources.add(pos);
|
entry.sources.add(pos);
|
||||||
|
markDirty();
|
||||||
}
|
}
|
||||||
markDirty();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeSource(int id, BlockPosWithDimension pos) {
|
public void removeSource(int id, BlockPosWithDimension pos) {
|
||||||
|
@ -65,7 +65,7 @@ public abstract class MixinEntity implements PortalCooldownEntity {
|
|||||||
|
|
||||||
@Inject(at = @At("HEAD"), method = "hasNoGravity", cancellable = true)
|
@Inject(at = @At("HEAD"), method = "hasNoGravity", cancellable = true)
|
||||||
public void hasNoGravity(CallbackInfoReturnable<Boolean> info) {
|
public void hasNoGravity(CallbackInfoReturnable<Boolean> info) {
|
||||||
if (isTouching(block -> block instanceof BeamBlock) && !saving) {
|
if (!saving && isTouching(block -> block instanceof BeamBlock)) {
|
||||||
info.setReturnValue(true);
|
info.setReturnValue(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,9 +88,7 @@ public abstract class MixinEntity implements PortalCooldownEntity {
|
|||||||
|
|
||||||
@Inject(at = @At("RETURN"), method = "tick")
|
@Inject(at = @At("RETURN"), method = "tick")
|
||||||
public void tick(CallbackInfo info) {
|
public void tick(CallbackInfo info) {
|
||||||
if (!isTouching(block -> block == EnergonRelics.ENERGY_PORTAL_BLOCK) && energyPortalCooldown > 0) {
|
energyPortalCooldown--;
|
||||||
energyPortalCooldown--;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user