Update dependencies and mappings.
This commit is contained in:
@@ -172,7 +172,7 @@ public abstract class NetworkNode implements INetworkNode, INetworkNodeVisitor {
|
||||
}
|
||||
|
||||
if (tag.hasKey(NBT_DIRECTION)) {
|
||||
direction = EnumFacing.getFront(tag.getInteger(NBT_DIRECTION));
|
||||
direction = EnumFacing.byIndex(tag.getInteger(NBT_DIRECTION));
|
||||
}
|
||||
|
||||
if (tag.hasKey(NBT_VERSION)) {
|
||||
|
||||
@@ -241,17 +241,17 @@ public class NetworkNodeConstructor extends NetworkNode implements IComparable,
|
||||
|
||||
// From BlockDispenser#getDispensePosition
|
||||
private double getDispensePositionX() {
|
||||
return (double) pos.getX() + 0.5D + 0.8D * (double) getDirection().getFrontOffsetX();
|
||||
return (double) pos.getX() + 0.5D + 0.8D * (double) getDirection().getXOffset();
|
||||
}
|
||||
|
||||
// From BlockDispenser#getDispensePosition
|
||||
private double getDispensePositionY() {
|
||||
return (double) pos.getY() + (getDirection() == EnumFacing.DOWN ? 0.45D : 0.5D) + 0.8D * (double) getDirection().getFrontOffsetY();
|
||||
return (double) pos.getY() + (getDirection() == EnumFacing.DOWN ? 0.45D : 0.5D) + 0.8D * (double) getDirection().getYOffset();
|
||||
}
|
||||
|
||||
// From BlockDispenser#getDispensePosition
|
||||
private double getDispensePositionZ() {
|
||||
return (double) pos.getZ() + 0.5D + 0.8D * (double) getDirection().getFrontOffsetZ();
|
||||
return (double) pos.getZ() + 0.5D + 0.8D * (double) getDirection().getZOffset();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -222,7 +222,7 @@ public class NetworkNodeCrafter extends NetworkNode implements ICraftingPatternC
|
||||
}
|
||||
|
||||
if (facing != null) {
|
||||
return world.getBlockState(pos.offset(getDirection())).getBlock().getUnlocalizedName() + ".name";
|
||||
return world.getBlockState(pos.offset(getDirection())).getBlock().getTranslationKey() + ".name";
|
||||
}
|
||||
|
||||
return DEFAULT_NAME;
|
||||
|
||||
@@ -94,7 +94,7 @@ public class NetworkNodeDestructor extends NetworkNode implements IComparable, I
|
||||
if (pickupItem && type == IType.ITEMS) {
|
||||
List<Entity> droppedItems = new ArrayList<>();
|
||||
|
||||
Chunk chunk = world.getChunkFromBlockCoords(front);
|
||||
Chunk chunk = world.getChunk(front);
|
||||
chunk.getEntitiesWithinAABBForEntity(null, new AxisAlignedBB(front), droppedItems, null);
|
||||
|
||||
for (Entity entity : droppedItems) {
|
||||
|
||||
@@ -88,7 +88,7 @@ public class CoverManager {
|
||||
NBTTagCompound tag = list.getCompoundTagAt(i);
|
||||
|
||||
if (tag.hasKey(NBT_DIRECTION) && tag.hasKey(NBT_ITEM)) {
|
||||
EnumFacing direction = EnumFacing.getFront(tag.getInteger(NBT_DIRECTION));
|
||||
EnumFacing direction = EnumFacing.byIndex(tag.getInteger(NBT_DIRECTION));
|
||||
ItemStack item = new ItemStack(tag.getCompoundTag(NBT_ITEM));
|
||||
int type = tag.hasKey(NBT_TYPE) ? tag.getInteger(NBT_TYPE) : 0;
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ public class ReaderWriterHandlerItems implements IReaderWriterHandler {
|
||||
ItemStack stack = handler.getStackInSlot(i);
|
||||
|
||||
if (!stack.isEmpty()) {
|
||||
components.add(new TextComponentString(stack.getCount() + "x ").appendSibling(new TextComponentTranslation(stack.getUnlocalizedName() + ".name")));
|
||||
components.add(new TextComponentString(stack.getCount() + "x ").appendSibling(new TextComponentTranslation(stack.getTranslationKey() + ".name")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,9 +80,9 @@ public class Comparer implements IComparer {
|
||||
}
|
||||
|
||||
if (!ItemStack.areItemStackTagsEqual(left, right)) {
|
||||
if (left.hasTagCompound() && !right.hasTagCompound() && left.getTagCompound().hasNoTags()) {
|
||||
if (left.hasTagCompound() && !right.hasTagCompound() && left.getTagCompound().isEmpty()) {
|
||||
return true;
|
||||
} else if (!left.hasTagCompound() && right.hasTagCompound() && right.getTagCompound().hasNoTags()) {
|
||||
} else if (!left.hasTagCompound() && right.hasTagCompound() && right.getTagCompound().isEmpty()) {
|
||||
return true;
|
||||
} else if (!left.hasTagCompound() && !right.hasTagCompound()) {
|
||||
return true;
|
||||
|
||||
@@ -44,7 +44,7 @@ public abstract class BlockBase extends Block {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
public String getTranslationKey() {
|
||||
return "block." + info.getId().toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ public class BlockCable extends BlockNode {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class BlockController extends BlockNodeProxy {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public class BlockCrafter extends BlockNode {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class BlockCrafterManager extends BlockNode {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class BlockCraftingMonitor extends BlockNode {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ public class BlockDetector extends BlockNode {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class BlockDiskManipulator extends BlockNode {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class BlockGrid extends BlockNode {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class BlockNetworkReceiver extends BlockNode {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class BlockNetworkTransmitter extends BlockNode {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class BlockRelay extends BlockNode {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public class BlockSecurityManager extends BlockNode {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ public class BlockWirelessTransmitter extends BlockNode {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class GridFilterFilter implements Predicate<IGridStack> {
|
||||
lastMode = filter.getMode();
|
||||
|
||||
if (filter.isModFilter()) {
|
||||
if (filter.getStack().getItem().getRegistryName().getResourceDomain().equalsIgnoreCase(stackModId)) {
|
||||
if (filter.getStack().getItem().getRegistryName().getNamespace().equalsIgnoreCase(stackModId)) {
|
||||
return filter.getMode() == IFilter.MODE_WHITELIST;
|
||||
}
|
||||
} else if (API.instance().getComparer().isEqual(stack, filter.getStack(), filter.getCompare())) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class GridStackFluid implements IGridStack {
|
||||
|
||||
@Override
|
||||
public String getModId() {
|
||||
return stack.getFluid().getStill(stack).getResourceDomain();
|
||||
return stack.getFluid().getStill(stack).getNamespace();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -65,7 +65,8 @@ public class MoveFactoryNetworkNode implements IMoveFactory {
|
||||
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileNode) {
|
||||
((TileNode) tile).setDirection(EnumFacing.getFront(tag.getInteger(NBT_DIRECTION)));
|
||||
((TileNode) tile).setDirection(EnumFacing.byIndex(tag.getInteger(NBT_DIRECTION)));
|
||||
|
||||
tile.markDirty();
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ public class EnvironmentNetwork extends AbstractManagedEnvironment {
|
||||
}
|
||||
|
||||
// Third argument: which direction to extract to
|
||||
EnumFacing facing = EnumFacing.getFront(args.optInteger(2, 0));
|
||||
EnumFacing facing = EnumFacing.byIndex(args.optInteger(2, 0));
|
||||
|
||||
// Get the tile-entity on the specified side
|
||||
TileEntity targetEntity = node.getNetwork().world().getTileEntity(node.getPos().offset(facing));
|
||||
@@ -258,7 +258,7 @@ public class EnvironmentNetwork extends AbstractManagedEnvironment {
|
||||
count = Math.min(count, stack.getMaxStackSize());
|
||||
|
||||
// Third argument: which direction to extract to
|
||||
EnumFacing facing = EnumFacing.getFront(args.optInteger(2, 0));
|
||||
EnumFacing facing = EnumFacing.byIndex(args.optInteger(2, 0));
|
||||
|
||||
// Get the tile-entity on the specified side
|
||||
TileEntity targetEntity = node.getNetwork().world().getTileEntity(node.getPos().offset(facing));
|
||||
|
||||
@@ -23,16 +23,16 @@ public abstract class ItemBase extends Item {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
public String getTranslationKey() {
|
||||
return "item." + info.getId().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
if (getHasSubtypes()) {
|
||||
return getUnlocalizedName() + "." + stack.getItemDamage();
|
||||
return getTranslationKey() + "." + stack.getItemDamage();
|
||||
}
|
||||
|
||||
return getUnlocalizedName();
|
||||
return getTranslationKey();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ItemCuttingTool extends ItemBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return getUnlocalizedName();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return getTranslationKey(); // Ignore damage
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,12 +33,12 @@ public class ItemBlockBase extends ItemBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
if (getHasSubtypes()) {
|
||||
return getUnlocalizedName() + "." + stack.getItemDamage();
|
||||
return getTranslationKey() + "." + stack.getItemDamage();
|
||||
}
|
||||
|
||||
return getUnlocalizedName();
|
||||
return getTranslationKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -72,7 +72,7 @@ public class ProxyClient extends ProxyCommon implements IModelRegistration {
|
||||
@SubscribeEvent
|
||||
public void onModelBake(ModelBakeEvent e) {
|
||||
for (ModelResourceLocation resource : e.getModelRegistry().getKeys()) {
|
||||
ResourceLocation key = new ResourceLocation(resource.getResourceDomain(), resource.getResourcePath());
|
||||
ResourceLocation key = new ResourceLocation(resource.getNamespace(), resource.getPath());
|
||||
|
||||
if (bakedModelOverrides.containsKey(key)) {
|
||||
e.getModelRegistry().putObject(resource, bakedModelOverrides.get(key).apply(e.getModelRegistry().getObject(resource)));
|
||||
|
||||
@@ -318,7 +318,7 @@ public class ProxyCommon {
|
||||
OneSixMigrationHelper.removalHook();
|
||||
|
||||
for (RegistryEvent.MissingMappings.Mapping<Item> missing : e.getMappings()) {
|
||||
if (missing.key.getResourceDomain().equals(RS.ID) && (missing.key.getResourcePath().equals("wrench") || missing.key.getResourcePath().equals("solderer"))) {
|
||||
if (missing.key.getNamespace().equals(RS.ID) && (missing.key.getPath().equals("wrench") || missing.key.getPath().equals("solderer"))) {
|
||||
missing.ignore();
|
||||
}
|
||||
}
|
||||
@@ -329,7 +329,7 @@ public class ProxyCommon {
|
||||
OneSixMigrationHelper.removalHook();
|
||||
|
||||
for (RegistryEvent.MissingMappings.Mapping<Block> missing : e.getMappings()) {
|
||||
if (missing.key.getResourceDomain().equals(RS.ID) && missing.key.getResourcePath().equals("solderer")) {
|
||||
if (missing.key.getNamespace().equals(RS.ID) && missing.key.getPath().equals("solderer")) {
|
||||
missing.ignore();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,13 +325,13 @@ public class CubeBuilder {
|
||||
builder.put(i, x, y, z);
|
||||
break;
|
||||
case NORMAL:
|
||||
builder.put(i, face.face.getFrontOffsetX(), face.face.getFrontOffsetY(), face.face.getFrontOffsetZ());
|
||||
builder.put(i, face.face.getXOffset(), face.face.getYOffset(), face.face.getZOffset());
|
||||
break;
|
||||
case COLOR:
|
||||
float r = (color >> 16 & 0xFF) / 255f;
|
||||
float g = (color >> 8 & 0xFF) / 255f;
|
||||
float b = (color & 0xFF) / 255f;
|
||||
float a = (color >> 24 & 0xFF) / 255f;
|
||||
float r = (color >> 16 & 0xFF) / 255F;
|
||||
float g = (color >> 8 & 0xFF) / 255F;
|
||||
float b = (color & 0xFF) / 255F;
|
||||
float a = (color >> 24 & 0xFF) / 255F;
|
||||
|
||||
builder.put(i, r, g, b, a);
|
||||
break;
|
||||
|
||||
@@ -20,7 +20,7 @@ public final class AdvancedRayTracer {
|
||||
Vec3d lookVec = player.getLookVec();
|
||||
Vec3d start = getStart(player);
|
||||
|
||||
return start.addVector(lookVec.x * reachDistance, lookVec.y * reachDistance, lookVec.z * reachDistance);
|
||||
return start.add(lookVec.x * reachDistance, lookVec.y * reachDistance, lookVec.z * reachDistance);
|
||||
}
|
||||
|
||||
public static AdvancedRayTraceResult<RayTraceResult> rayTrace(BlockPos pos, Vec3d start, Vec3d end, Collection<CollisionGroup> groups) {
|
||||
|
||||
@@ -82,7 +82,7 @@ public class BakedModelTRSR implements IBakedModel {
|
||||
try {
|
||||
// adjust side to facing-rotation
|
||||
if (side != null && side.getHorizontalIndex() > -1) {
|
||||
side = EnumFacing.getHorizontal((side.getHorizontalIndex() + faceOffset) % 4);
|
||||
side = EnumFacing.byHorizontalIndex((side.getHorizontalIndex() + faceOffset) % 4);
|
||||
}
|
||||
for (BakedQuad quad : original.getQuads(state, side, rand)) {
|
||||
Transformer transformer = new Transformer(transformation, quad.getFormat());
|
||||
|
||||
@@ -13,7 +13,7 @@ import javax.annotation.Nullable;
|
||||
public class CustomModelLoaderCover implements ICustomModelLoader {
|
||||
@Override
|
||||
public boolean accepts(ResourceLocation modelLocation) {
|
||||
return modelLocation.getResourceDomain().equals(RS.ID) && getType(modelLocation) != null;
|
||||
return modelLocation.getNamespace().equals(RS.ID) && getType(modelLocation) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -23,7 +23,7 @@ public class CustomModelLoaderCover implements ICustomModelLoader {
|
||||
|
||||
@Nullable
|
||||
private CoverType getType(ResourceLocation modelLocation) {
|
||||
switch (modelLocation.getResourcePath()) {
|
||||
switch (modelLocation.getPath()) {
|
||||
case "cover":
|
||||
return CoverType.NORMAL;
|
||||
case "hollow_cover":
|
||||
|
||||
@@ -26,7 +26,7 @@ public class DirectionHandlerTile implements IDirectionHandler {
|
||||
@Override
|
||||
public void readFromTileNbt(NBTTagCompound tag) {
|
||||
if (tag.hasKey(NBT_DIRECTION)) {
|
||||
direction = EnumFacing.getFront(tag.getInteger(NBT_DIRECTION));
|
||||
direction = EnumFacing.byIndex(tag.getInteger(NBT_DIRECTION));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public abstract class TileBase extends TileEntity {
|
||||
public void readUpdate(NBTTagCompound tag) {
|
||||
boolean doRender = canCauseRenderUpdate(tag);
|
||||
|
||||
clientDirection = EnumFacing.getFront(tag.getInteger(NBT_DIRECTION));
|
||||
clientDirection = EnumFacing.byIndex(tag.getInteger(NBT_DIRECTION));
|
||||
|
||||
if (doRender) {
|
||||
WorldUtils.updateBlock(world, pos);
|
||||
|
||||
@@ -76,7 +76,7 @@ public abstract class TileNode<N extends NetworkNode> extends TileBase implement
|
||||
|
||||
OneSixMigrationHelper.removalHook();
|
||||
if (tag.hasKey(NBT_DIRECTION)) {
|
||||
directionToMigrate = EnumFacing.getFront(tag.getInteger("Direction"));
|
||||
directionToMigrate = EnumFacing.byIndex(tag.getInteger("Direction"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public class TileStorageMonitor extends TileNode<NetworkNodeStorageMonitor> {
|
||||
|
||||
@Override
|
||||
protected boolean canCauseRenderUpdate(NBTTagCompound tag) {
|
||||
EnumFacing receivedDirection = EnumFacing.getFront(tag.getInteger(NBT_DIRECTION));
|
||||
EnumFacing receivedDirection = EnumFacing.byIndex(tag.getInteger(NBT_DIRECTION));
|
||||
boolean receivedActive = tag.getBoolean(NBT_ACTIVE);
|
||||
|
||||
return receivedDirection != getDirection() || receivedActive != getNode().isActive();
|
||||
|
||||
Reference in New Issue
Block a user