Mappings
This commit is contained in:
parent
389b716880
commit
f5c6b59ebd
79 changed files with 163 additions and 204 deletions
|
@ -61,7 +61,6 @@ public class RegisterItemJsons {
|
|||
register(ModItems.MANUAL, "misc/manual");
|
||||
register(ModItems.DEBUG, "misc/debug");
|
||||
register(ModBlocks.RUBBER_SAPLING, "misc/rubber_sapling");
|
||||
register(ModItems.MISSING_RECIPE_PLACEHOLDER, "misc/missing_recipe");
|
||||
|
||||
register(ModItems.STEEL_DRILL, "tool/steel_drill");
|
||||
register(ModItems.DIAMOND_DRILL, "tool/diamond_drill");
|
||||
|
@ -181,9 +180,9 @@ public class RegisterItemJsons {
|
|||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||
Map<IProperty<?>, Comparable<?>> map = Maps.<IProperty<?>, Comparable<?>>newLinkedHashMap(state.getProperties());
|
||||
if (state.getValue(BlockCable.TYPE).ordinal() <= 4) {
|
||||
return new ModelResourceLocation(new ResourceLocation(ModBlocks.CABLE.getRegistryName().getResourceDomain(), ModBlocks.CABLE.getRegistryName().getResourcePath()) + "_thin", this.getPropertyString(map));
|
||||
return new ModelResourceLocation(new ResourceLocation(ModBlocks.CABLE.getRegistryName().getNamespace(), ModBlocks.CABLE.getRegistryName().getPath()) + "_thin", this.getPropertyString(map));
|
||||
}
|
||||
return new ModelResourceLocation(new ResourceLocation(ModBlocks.CABLE.getRegistryName().getResourceDomain(), ModBlocks.CABLE.getRegistryName().getResourcePath()) + "_thick", this.getPropertyString(map));
|
||||
return new ModelResourceLocation(new ResourceLocation(ModBlocks.CABLE.getRegistryName().getNamespace(), ModBlocks.CABLE.getRegistryName().getPath()) + "_thick", this.getPropertyString(map));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -197,7 +196,7 @@ public class RegisterItemJsons {
|
|||
for (IProperty<?> iproperty : ignoredProperties) {
|
||||
map.remove(iproperty);
|
||||
}
|
||||
return new ModelResourceLocation(new ResourceLocation(block.getRegistryName().getResourceDomain(), path + slash + block.getRegistryName().getResourcePath()), this.getPropertyString(map));
|
||||
return new ModelResourceLocation(new ResourceLocation(block.getRegistryName().getNamespace(), path + slash + block.getRegistryName().getPath()), this.getPropertyString(map));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -230,7 +229,7 @@ public class RegisterItemJsons {
|
|||
}
|
||||
|
||||
private static void registerBlockstate(Item i, int meta, String variant, String dir) {
|
||||
ResourceLocation loc = new ResourceLocation("techreborn", dir + i.getRegistryName().getResourcePath());
|
||||
ResourceLocation loc = new ResourceLocation("techreborn", dir + i.getRegistryName().getPath());
|
||||
ModelLoader.setCustomModelResourceLocation(i, meta, new ModelResourceLocation(loc, "type=" + variant));
|
||||
}
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ public class GuiBase extends GuiContainer {
|
|||
}
|
||||
|
||||
protected void drawTitle() {
|
||||
drawCentredString(I18n.format(tile.getBlockType().getUnlocalizedName() + ".name"), 6, 4210752, Layer.FOREGROUND);
|
||||
drawCentredString(I18n.format(tile.getBlockType().getTranslationKey() + ".name"), 6, 4210752, Layer.FOREGROUND);
|
||||
}
|
||||
|
||||
protected void drawCentredString(String string, int y, int colour, Layer layer) {
|
||||
|
|
|
@ -157,9 +157,9 @@ public class GuiBlastFurnace extends GuiBase {
|
|||
// this.tile.getPos().getY(), this.tile.getPos().getZ(), this.tile.getWorld());
|
||||
MultiblockRenderEvent.anchor = new BlockPos(
|
||||
this.tile.getPos().getX()
|
||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetX() * 2,
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getXOffset() * 2,
|
||||
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetZ() * 2);
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getZOffset() * 2);
|
||||
}
|
||||
} else {
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||
|
|
|
@ -154,9 +154,9 @@ public class GuiDistillationTower extends GuiBase {
|
|||
ClientProxy.multiblockRenderEvent.parent = this.tile.getPos();
|
||||
MultiblockRenderEvent.anchor = new BlockPos(
|
||||
this.tile.getPos().getX()
|
||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetX() * 2,
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getXOffset() * 2,
|
||||
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetZ() * 2);
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getZOffset() * 2);
|
||||
}
|
||||
} else {
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||
|
|
|
@ -134,9 +134,9 @@ public class GuiFluidReplicator extends GuiBase {
|
|||
ClientProxy.multiblockRenderEvent.parent = tile.getPos();
|
||||
MultiblockRenderEvent.anchor = new BlockPos(
|
||||
this.tile.getPos().getX()
|
||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetX() * 2,
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getXOffset() * 2,
|
||||
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetZ() * 2);
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getZOffset() * 2);
|
||||
}
|
||||
} else {
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||
|
|
|
@ -153,9 +153,9 @@ public class GuiIndustrialGrinder extends GuiBase {
|
|||
ClientProxy.multiblockRenderEvent.parent = this.tile.getPos();
|
||||
MultiblockRenderEvent.anchor = new BlockPos(
|
||||
this.tile.getPos().getX()
|
||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetX() * 2,
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getXOffset() * 2,
|
||||
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetZ() * 2);
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getZOffset() * 2);
|
||||
}
|
||||
} else {
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||
|
|
|
@ -152,9 +152,9 @@ public class GuiIndustrialSawmill extends GuiBase {
|
|||
ClientProxy.multiblockRenderEvent.parent = this.tile.getPos();
|
||||
MultiblockRenderEvent.anchor = new BlockPos(
|
||||
this.tile.getPos().getX()
|
||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetX() * 2,
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getYOffset() * 2,
|
||||
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
|
||||
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetZ() * 2);
|
||||
- EnumFacing.byIndex(this.tile.getFacingInt()).getYOffset() * 2);
|
||||
}
|
||||
} else {
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||
|
|
|
@ -129,7 +129,7 @@ public class ModelDynamicCell implements IModel {
|
|||
|
||||
@Override
|
||||
public boolean accepts(ResourceLocation modelLocation) {
|
||||
return modelLocation.getResourceDomain().equals("techreborn") && modelLocation.getResourcePath().contains("dynamic_cell");
|
||||
return modelLocation.getNamespace().equals("techreborn") && modelLocation.getNamespace().contains("dynamic_cell");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -60,7 +60,7 @@ public class ModelHelper {
|
|||
}
|
||||
|
||||
public static Reader getReaderForResource(ResourceLocation location) throws IOException {
|
||||
ResourceLocation file = new ResourceLocation(location.getResourceDomain(), location.getResourcePath() + ".json");
|
||||
ResourceLocation file = new ResourceLocation(location.getNamespace(), location.getPath() + ".json");
|
||||
IResource iresource = Minecraft.getMinecraft().getResourceManager().getResource(file);
|
||||
return new BufferedReader(new InputStreamReader(iresource.getInputStream(), Charsets.UTF_8));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue