Compiles again.
This commit is contained in:
@@ -65,7 +65,7 @@ public class ChunkLoaderTileEntity extends AEBaseTileEntity implements ITickable
|
||||
|
||||
if (!serverWorld.getForcedChunks().contains(chunkPos.asLong())) {
|
||||
AELog.debug("Force-loading chunk @ %d,%d in %s", chunkPos.x, chunkPos.z,
|
||||
serverWorld.dimension.getType().getRegistryName());
|
||||
serverWorld.func_234923_W_());
|
||||
serverWorld.forceChunk(chunkPos.x, chunkPos.z, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import net.minecraft.item.ItemUseContext;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
|
||||
@@ -51,7 +52,7 @@ public class CubeGeneratorTileEntity extends AEBaseTileEntity implements ITickab
|
||||
|
||||
if (this.countdown % 20 == 0) {
|
||||
for (final PlayerEntity e : AppEng.proxy.getPlayers()) {
|
||||
e.sendMessage(new StringTextComponent("Spawning in... " + (this.countdown / 20)));
|
||||
e.sendMessage(new StringTextComponent("Spawning in... " + (this.countdown / 20)), Util.DUMMY_UUID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +103,7 @@ public class CubeGeneratorTileEntity extends AEBaseTileEntity implements ITickab
|
||||
this.size = 64;
|
||||
}
|
||||
|
||||
player.sendMessage(new StringTextComponent("Size: " + this.size));
|
||||
player.sendMessage(new StringTextComponent("Size: " + this.size), Util.DUMMY_UUID);
|
||||
} else {
|
||||
this.countdown = 20 * 10;
|
||||
this.is = hand;
|
||||
|
||||
@@ -28,6 +28,7 @@ import net.minecraft.item.ItemUseContext;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.world.World;
|
||||
@@ -186,7 +187,7 @@ public class DebugCardItem extends AEBaseItem {
|
||||
}
|
||||
|
||||
private void outputMsg(final Entity player, final String string) {
|
||||
player.sendMessage(new StringTextComponent(string));
|
||||
player.sendMessage(new StringTextComponent(string), Util.DUMMY_UUID);
|
||||
}
|
||||
|
||||
private String timeMeasurement(final long nanos) {
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.item.ItemUseContext;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.vector.Vector3i;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
@@ -49,19 +50,19 @@ public class DebugPartPlacerItem extends AEBaseItem {
|
||||
}
|
||||
|
||||
if (!player.abilities.isCreativeMode) {
|
||||
player.sendMessage(new StringTextComponent("Only usable in creative mode"));
|
||||
player.sendMessage(new StringTextComponent("Only usable in creative mode"), Util.DUMMY_UUID);
|
||||
return ActionResultType.FAIL;
|
||||
}
|
||||
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if (!(te instanceof IPartHost)) {
|
||||
player.sendMessage(new StringTextComponent("Right-click something that will accept parts"));
|
||||
player.sendMessage(new StringTextComponent("Right-click something that will accept parts"), Util.DUMMY_UUID);
|
||||
return ActionResultType.FAIL;
|
||||
}
|
||||
IPartHost center = (IPartHost) te;
|
||||
IPart cable = center.getPart(AEPartLocation.INTERNAL);
|
||||
if (cable == null) {
|
||||
player.sendMessage(new StringTextComponent("Clicked part host must have an INSIDE part"));
|
||||
player.sendMessage(new StringTextComponent("Clicked part host must have an INSIDE part"), Util.DUMMY_UUID);
|
||||
return ActionResultType.FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import net.minecraft.network.play.server.SChunkDataPacket;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.util.math.MutableBoundingBox;
|
||||
@@ -69,7 +70,7 @@ public class MeteoritePlacerItem extends AEBaseItem {
|
||||
|
||||
CraterType craterType = CraterType.values()[tag.getByte(MODE_TAG)];
|
||||
|
||||
player.sendMessage(new StringTextComponent(craterType.name()));
|
||||
player.sendMessage(new StringTextComponent(craterType.name()), Util.DUMMY_UUID);
|
||||
|
||||
return ActionResult.resultSuccess(itemStack);
|
||||
}
|
||||
@@ -106,7 +107,7 @@ public class MeteoritePlacerItem extends AEBaseItem {
|
||||
pureCrater, false);
|
||||
|
||||
if (spawned == null) {
|
||||
player.sendMessage(new StringTextComponent("Un-suitable Location."));
|
||||
player.sendMessage(new StringTextComponent("Un-suitable Location."), Util.DUMMY_UUID);
|
||||
return ActionResultType.FAIL;
|
||||
}
|
||||
|
||||
@@ -121,14 +122,14 @@ public class MeteoritePlacerItem extends AEBaseItem {
|
||||
placer.place();
|
||||
|
||||
player.sendMessage(new StringTextComponent("Spawned at y=" + spawned.getPos().getY() + " range=" + range
|
||||
+ " biomeCategory=" + world.getBiome(pos).getCategory()));
|
||||
+ " biomeCategory=" + world.getBiome(pos).getCategory()), Util.DUMMY_UUID);
|
||||
|
||||
// The placer will not send chunks to the player since it's used as part
|
||||
// of world-gen normally, so we'll have to do it ourselves. Since this
|
||||
// is a debug tool, we'll not care about being terribly efficient here
|
||||
ChunkPos.getAllInBox(new ChunkPos(spawned.getPos()), 1).forEach(cp -> {
|
||||
Chunk c = world.getChunk(cp.x, cp.z);
|
||||
player.connection.sendPacket(new SChunkDataPacket(c, 65535)); // 65535 == full chunk
|
||||
player.connection.sendPacket(new SChunkDataPacket(c, 65535, false)); // 65535 == full chunk
|
||||
});
|
||||
|
||||
return ActionResultType.SUCCESS;
|
||||
|
||||
@@ -30,8 +30,12 @@ import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.RegistryKey;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.world.DimensionType;
|
||||
import net.minecraft.world.World;
|
||||
@@ -64,7 +68,7 @@ public class ReplicatorCardItem extends AEBaseItem {
|
||||
|
||||
tag.putInt("r", replications);
|
||||
|
||||
playerIn.sendMessage(new StringTextComponent((replications + 1) + "³ Replications"));
|
||||
playerIn.sendMessage(new StringTextComponent((replications + 1) + "³ Replications"), Util.DUMMY_UUID);
|
||||
}
|
||||
|
||||
return super.onItemRightClick(worldIn, playerIn, handIn);
|
||||
@@ -98,7 +102,7 @@ public class ReplicatorCardItem extends AEBaseItem {
|
||||
tag.putInt("y", y);
|
||||
tag.putInt("z", z);
|
||||
tag.putInt("side", side.ordinal());
|
||||
tag.putInt("dimid", world.getDimension().getType().getId());
|
||||
tag.putString("w", world.func_234923_W_().func_240901_a_().toString());
|
||||
tag.putInt("r", 0);
|
||||
|
||||
this.outputMsg(player, "Set replicator source");
|
||||
@@ -112,8 +116,9 @@ public class ReplicatorCardItem extends AEBaseItem {
|
||||
final int src_y = ish.getInt("y");
|
||||
final int src_z = ish.getInt("z");
|
||||
final int src_side = ish.getInt("side");
|
||||
final int dimid = ish.getInt("dimid");
|
||||
final World src_w = world.getServer().getWorld(DimensionType.getById(dimid));
|
||||
final String worldId = ish.getString("w");
|
||||
final World src_w = world.getServer()
|
||||
.getWorld(RegistryKey.func_240903_a_(Registry.WORLD_KEY, new ResourceLocation(worldId)));
|
||||
final int replications = ish.getInt("r") + 1;
|
||||
|
||||
final TileEntity te = src_w.getTileEntity(new BlockPos(src_x, src_y, src_z));
|
||||
@@ -182,7 +187,7 @@ public class ReplicatorCardItem extends AEBaseItem {
|
||||
final TileEntity nte = blk.createTileEntity(state, world);
|
||||
final CompoundNBT data = new CompoundNBT();
|
||||
ote.write(data);
|
||||
nte.read(data.copy());
|
||||
nte.read(state, data.copy());
|
||||
world.setTileEntity(d, nte);
|
||||
}
|
||||
world.notifyBlockUpdate(d, prev, state, 3);
|
||||
@@ -212,6 +217,6 @@ public class ReplicatorCardItem extends AEBaseItem {
|
||||
}
|
||||
|
||||
private void outputMsg(final Entity player, final String string) {
|
||||
player.sendMessage(new StringTextComponent(string));
|
||||
player.sendMessage(new StringTextComponent(string), Util.DUMMY_UUID);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user