Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mappings to final 1.12 mappings #99

Open
wants to merge 1 commit into
base: 1.12
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if (project.hasProperty('mod_appendix')) {
}

minecraft {
mappings = "snapshot_20171212"
mappings = "stable_39"
version = "${minecraft_version}-${forge_version}"
runDir = 'run'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public static void addTooltipFromResources(@Nonnull List<String> list, @Nullable
unlocalizedNameForTooltip = ((IResourceTooltipProvider) itemstack.getItem()).getUnlocalizedNameForTooltip(itemstack);
}
if (unlocalizedNameForTooltip == null) {
unlocalizedNameForTooltip = itemstack.getItem().getUnlocalizedName(itemstack);
unlocalizedNameForTooltip = itemstack.getItem().getTranslationKey(itemstack);
}
return unlocalizedNameForTooltip;
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/enderio/core/client/render/RenderUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public static float getColorMultiplierForFace(@Nonnull EnumFacing face) {
if (face == EnumFacing.DOWN) {
return 0.5f;
}
if (face.getFrontOffsetX() != 0) {
if (face.getXOffset() != 0) {
return 0.6f;
}
return 0.8f; // z
Expand Down Expand Up @@ -262,13 +262,13 @@ public static void renderBillboard(@Nonnull Matrix4d lookMat, float minU, float
*/
public static List<EnumFacing> getEdgesForFace(@Nonnull EnumFacing face) {
List<EnumFacing> result = new ArrayList<EnumFacing>(4);
if (face.getFrontOffsetY() != 0) {
if (face.getYOffset() != 0) {
result.add(NORTH);
result.add(EAST);
result.add(SOUTH);
result.add(WEST);

} else if (face.getFrontOffsetX() != 0) {
} else if (face.getXOffset() != 0) {
result.add(DOWN);
result.add(SOUTH);
result.add(UP);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void setRotation(@Nonnull EnumFacing dir) {
}

public EnumFacing rotate(@Nonnull EnumFacing dir) {
if (dir.getFrontOffsetY() != 0) {
if (dir.getYOffset() != 0) {
return dir;
}
if (getAngle() == ROTATION_AMOUNT) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/enderio/core/common/TileEntityBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public final void onDataPacket(@Nonnull NetworkManager net, @Nonnull SPacketUpda
protected void writeCustomNBT(@Nonnull ItemStack stack) {
final NBTTagCompound tag = new NBTTagCompound();
writeCustomNBT(NBTAction.ITEM, tag);
if (!tag.hasNoTags()) {
if (!tag.isEmpty()) {
stack.setTagCompound(tag);
}
}
Expand Down Expand Up @@ -183,7 +183,7 @@ protected void updateBlock() {
}

protected boolean isPoweredRedstone() {
return hasWorld() && world.isBlockLoaded(getPos()) ? world.isBlockIndirectlyGettingPowered(getPos()) > 0 : false;
return hasWorld() && world.isBlockLoaded(getPos()) ? world.getRedstonePowerFromNeighbors(getPos()) > 0 : false;
}

/**
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/enderio/core/common/fluid/BlockFluidEnder.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ public abstract class BlockFluidEnder extends BlockFluidClassic {
private float fogColorRed = 1f;
private float fogColorGreen = 1f;
private float fogColorBlue = 1f;
private final @Nonnull Material material;
private final @Nonnull Material fluidMaterial;

protected BlockFluidEnder(@Nonnull Fluid fluid, @Nonnull Material material, int fogColor) {
super(fluid, new MaterialLiquid(material.getMaterialMapColor()) {
protected BlockFluidEnder(@Nonnull Fluid fluid, @Nonnull Material fluidMaterial, int fogColor) {
super(fluid, new MaterialLiquid(fluidMaterial.getMaterialMapColor()) {
// new Material for each liquid so neighboring different liquids render correctly and don't bleed into each other
@Override
public boolean blocksMovement() {
return true; // so our liquids are not replaced by water
}
});
this.material = material;
this.fluidMaterial = fluidMaterial;

// darken fog color to fit the fog rendering
float dim = 1;
Expand All @@ -52,7 +52,7 @@ public boolean blocksMovement() {
}

protected void setNames(Fluid fluid) {
setUnlocalizedName(NullHelper.notnullF(fluid.getUnlocalizedName(), "encountered fluid without a name"));
setTranslationKey(NullHelper.notnullF(fluid.getUnlocalizedName(), "encountered fluid without a name"));
setRegistryName("block_fluid_" + fluid.getName().toLowerCase(Locale.ENGLISH));
}

Expand Down Expand Up @@ -83,7 +83,7 @@ public void setFogColorBlue(float fogColorBlue) {
@Override
public Boolean isEntityInsideMaterial(@Nonnull IBlockAccess world, @Nonnull BlockPos blockpos, @Nonnull IBlockState iblockstate, @Nonnull Entity entity,
double yToTest, @Nonnull Material materialIn, boolean testingHead) {
if (materialIn == material || materialIn == this.blockMaterial) {
if (materialIn == fluidMaterial || materialIn == this.material) {
return Boolean.TRUE;
}
return super.isEntityInsideMaterial(world, blockpos, iblockstate, entity, yToTest, materialIn, testingHead);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void writeToNBT(@Nonnull NBTTagCompound tag) {
if (entry.getValue() != null) {
NBTTagCompound subTag = new NBTTagCompound();
entry.getValue().writeToNBT(subTag);
if (!subTag.hasNoTags()) {
if (!subTag.isEmpty()) {
tag.setTag(NullHelper.notnull(entry.getKey(), "Internal data corruption"), subTag);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void load() {

private static void addSlabRecipe(@Nonnull ItemStack stack, @Nonnull String slab) {
ForgeRegistries.RECIPES.register(new ShapelessOreRecipe(null, stack, slab, slab)
.setRegistryName(slab + "_to_" + NullHelper.notnullM(stack.getItem().getRegistryName(), "found unregistered item").getResourcePath()));
.setRegistryName(slab + "_to_" + NullHelper.notnullM(stack.getItem().getRegistryName(), "found unregistered item").getPath()));
}

private static void registerSlabToBlock() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public CreativeTabsCustom setDisplay(@Nonnull ItemStack display) {
}

@Override
public @Nonnull ItemStack getTabIconItem() {
public @Nonnull ItemStack createIcon() {
return displayStack;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public final class ForgeDirectionOffsets {

static {
for (EnumFacing dir : EnumFacing.values()) {
OFFSETS[dir.ordinal()] = new Vector3d(dir.getFrontOffsetX(), dir.getFrontOffsetY(), dir.getFrontOffsetZ());
OFFSETS[dir.ordinal()] = new Vector3d(dir.getXOffset(), dir.getYOffset(), dir.getZOffset());
}
}

Expand Down