Skip to content

Commit

Permalink
Updated MCP mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
fuj1n committed Jul 22, 2018
1 parent fd3b706 commit 68eac35
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.properties
Expand Up @@ -2,7 +2,7 @@ mod_version=2.0
minecraft_version=1.12.2
forge_version=14.23.4.2705

mappings_version=snapshot_20180603
mappings_version=snapshot_20180722

mantle_version=1.3.2.25
tinkers_version=2.9.1.70
Expand Down
Expand Up @@ -97,7 +97,7 @@ public boolean extendNext() {
EnumFacing face = getFacingDirection();

int extend = getExtendState() + 1;
BlockPos nextPos = new BlockPos(pos.getX() + face.getFrontOffsetX() * extend, pos.getY() + face.getFrontOffsetY() * extend, pos.getZ() + face.getFrontOffsetZ() * extend);
BlockPos nextPos = new BlockPos(pos.getX() + face.getXOffset() * extend, pos.getY() + face.getYOffset() * extend, pos.getZ() + face.getZOffset() * extend);

if (placeBlock(nextPos)) {
subtractNextBlock();
Expand All @@ -112,7 +112,7 @@ public boolean retractNext() {
EnumFacing face = getFacingDirection();

int extend = getExtendState();
BlockPos nextPos = new BlockPos(pos.getX() + face.getFrontOffsetX() * extend, pos.getY() + face.getFrontOffsetY() * extend, pos.getZ() + face.getFrontOffsetZ() * extend);
BlockPos nextPos = new BlockPos(pos.getX() + face.getXOffset() * extend, pos.getY() + face.getYOffset() * extend, pos.getZ() + face.getZOffset() * extend);

if (breakBlock(nextPos)) {
addLastBlock();
Expand Down
Expand Up @@ -38,7 +38,7 @@ public void setFire ()
EnumFacing facing = getFacingDirection();

BlockPos loc = getPos();
BlockPos position = new BlockPos(loc.getX() + facing.getFrontOffsetX(), loc.getY() + facing.getFrontOffsetY(), loc.getZ() + facing.getFrontOffsetZ());
BlockPos position = new BlockPos(loc.getX() + facing.getXOffset(), loc.getY() + facing.getYOffset(), loc.getZ() + facing.getZOffset());

IBlockState state = world.getBlockState(position);
if (getRedstoneState() > 0)
Expand Down
Expand Up @@ -115,7 +115,7 @@ protected static <T extends Block> T registerBlock(IForgeRegistry<Block> registr
}

String prefixedName = Util.prefix(name);
block.setUnlocalizedName(prefixedName);
block.setTranslationKey(prefixedName);

register(registry, block, name);
return block;
Expand All @@ -129,7 +129,7 @@ protected static <T extends Block> T registerItemBlock(IForgeRegistry<Item> regi

ItemBlock itemBlock = new ItemBlockMeta(block);

itemBlock.setUnlocalizedName(block.getUnlocalizedName());
itemBlock.setTranslationKey(block.getTranslationKey());

register(registry, itemBlock, block.getRegistryName());
return block;
Expand All @@ -138,7 +138,7 @@ protected static <T extends Block> T registerItemBlock(IForgeRegistry<Item> regi
protected static <T extends EnumBlock<?>> T registerEnumItemBlock(IForgeRegistry<Item> registry, T block) {
ItemBlock itemBlock = new ItemBlockMeta(block);

itemBlock.setUnlocalizedName(block.getUnlocalizedName());
itemBlock.setTranslationKey(block.getTranslationKey());

register(registry, itemBlock, block.getRegistryName());
ItemBlockMeta.setMappingProperty(block, block.prop);
Expand All @@ -159,15 +159,15 @@ protected static <T extends IEnumBlock<?>> T registerEnumItemBlockExtra(IForgeRe

@SuppressWarnings("unchecked")
protected static <T extends Block> T registerItemBlock(IForgeRegistry<Item> registry, ItemBlock itemBlock) {
itemBlock.setUnlocalizedName(itemBlock.getBlock().getUnlocalizedName());
itemBlock.setTranslationKey(itemBlock.getBlock().getTranslationKey());

register(registry, itemBlock, itemBlock.getBlock().getRegistryName());
return (T) itemBlock.getBlock();
}

@SuppressWarnings("unchecked")
protected static <T extends Block> T registerItemBlockProp(IForgeRegistry<Item> registry, ItemBlock itemBlock, IProperty<?> property) {
itemBlock.setUnlocalizedName(itemBlock.getBlock().getUnlocalizedName());
itemBlock.setTranslationKey(itemBlock.getBlock().getTranslationKey());

register(registry, itemBlock, itemBlock.getBlock().getRegistryName());
ItemBlockMeta.setMappingProperty(itemBlock.getBlock(), property);
Expand All @@ -178,7 +178,7 @@ protected static <T extends EnumBlockSlab<?>> T registerEnumItemBlockSlab(IForge
@SuppressWarnings({ "unchecked", "rawtypes" })
ItemBlock itemBlock = new ItemBlockSlab(block);

itemBlock.setUnlocalizedName(block.getUnlocalizedName());
itemBlock.setTranslationKey(block.getTranslationKey());

register(registry, itemBlock, block.getRegistryName());
ItemBlockMeta.setMappingProperty(block, block.prop);
Expand All @@ -193,7 +193,7 @@ protected static <T extends Item> T registerItem(IForgeRegistry<Item> registry,
throw new IllegalArgumentException(String.format("Unlocalized names need to be all lowercase! Item: %s", name));
}

item.setUnlocalizedName(Util.prefix(name));
item.setTranslationKey(Util.prefix(name));
item.setRegistryName(Util.getResource(name));
registry.register(item);
return item;
Expand Down

0 comments on commit 68eac35

Please sign in to comment.