Hbm-s-Nuclear-Tech-GIT/src/main/java/com/hbm/blocks/machine/MachineFieldDisturber.java
BallOfEnergy 4bd6f0df53 More shit, also precompiled packets.
also holy shit the whitespace changes, intelliJ wanted to optimize the imports and refactored a ton of whitespace in the process.
2024-11-09 17:04:19 -06:00

36 lines
930 B
Java

package com.hbm.blocks.machine;
import com.hbm.entity.logic.EntityNukeExplosionMK3;
import com.hbm.entity.logic.EntityNukeExplosionMK3.ATEntry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.World;
import java.util.Random;
public class MachineFieldDisturber extends Block {
public MachineFieldDisturber() {
super(Material.iron);
}
@Override
public int tickRate(World world) {
return 10;
}
@Override
public void onBlockAdded(World world, int x, int y, int z) {
if(!world.isRemote) world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
}
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
if(!world.isRemote) {
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
EntityNukeExplosionMK3.at.put(new ATEntry(world.provider.dimensionId, x, y, z), world.getTotalWorldTime() + 100);
}
}
}