minecraft-source/src/net/minecraft/world/level/BlockEventData.java

58 lines
1.5 KiB
Java

package net.minecraft.world.level;
import net.minecraft.world.level.block.Block;
import net.minecraft.core.BlockPos;
public class BlockEventData {
private final BlockPos pos;
private final Block block;
private final int paramA;
private final int paramB;
public BlockEventData(final BlockPos fk, final Block bpe, final int integer3, final int integer4) {
this.pos = fk;
this.block = bpe;
this.paramA = integer3;
this.paramB = integer4;
}
public BlockPos getPos() {
return this.pos;
}
public Block getBlock() {
return this.block;
}
public int getParamA() {
return this.paramA;
}
public int getParamB() {
return this.paramB;
}
@Override
public boolean equals(final Object object) {
if (object instanceof BlockEventData) {
final BlockEventData bjc3 = (BlockEventData)object;
return this.pos.equals(bjc3.pos) && this.paramA == bjc3.paramA && this.paramB == bjc3.paramB && this.block == bjc3.block;
}
return false;
}
@Override
public int hashCode() {
int integer2 = this.pos.hashCode();
integer2 = 31 * integer2 + this.block.hashCode();
integer2 = 31 * integer2 + this.paramA;
integer2 = 31 * integer2 + this.paramB;
return integer2;
}
@Override
public String toString() {
return "TE(" + this.pos + ")," + this.paramA + "," + this.paramB + "," + this.block;
}
}