Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.10' into 1.11
Browse files Browse the repository at this point in the history
# Conflicts:
#	gradle.properties
  • Loading branch information
jaquadro committed May 13, 2017
2 parents 554a432 + bd97fa0 commit d859e9a
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 20 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx3G
minecraft_base_version=1.11
minecraft_version=1.11.2
forge_version=13.20.0.2252
mod_version=4.2.5
chameleon_version=3.0.2
mod_version=4.2.6
chameleon_version=3.1.0
chameleon_max_version=4.0.0

jei_version=4.2.3.222
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public void toggleProtection (GameProfile profile, ISecurityProvider provider) {
}

public void toggleShroud (GameProfile profile) {
IShroudable template = null;
Boolean template = null;
boolean state = false;

for (StorageRecord record : storage.values()) {
Expand All @@ -263,8 +263,8 @@ public void toggleShroud (GameProfile profile) {

IShroudable shroudableStorage = (IShroudable)drawer;
if (template == null) {
template = shroudableStorage;
state = !template.isShrouded();
template = shroudableStorage.isShrouded();
state = !template;
}

shroudableStorage.setIsShrouded(state);
Expand All @@ -273,7 +273,7 @@ public void toggleShroud (GameProfile profile) {
}

public void toggleQuantified (GameProfile profile) {
IQuantifiable template = null;
Boolean template = null;
boolean state = false;

for (StorageRecord record : storage.values()) {
Expand All @@ -292,8 +292,8 @@ public void toggleQuantified (GameProfile profile) {

IQuantifiable quantifiableStorage = (IQuantifiable)drawer;
if (template == null) {
template = quantifiableStorage;
state = !template.isShowingQuantity();
template = quantifiableStorage.isShowingQuantity();
state = !template;
}

quantifiableStorage.setIsShowingQuantity(state);
Expand All @@ -302,7 +302,7 @@ public void toggleQuantified (GameProfile profile) {
}

public void toggleLock (EnumSet<LockAttribute> attributes, LockAttribute key, GameProfile profile) {
IItemLockable template = null;
Boolean template = null;
boolean state = false;

for (StorageRecord record : storage.values()) {
Expand All @@ -317,8 +317,8 @@ public void toggleLock (EnumSet<LockAttribute> attributes, LockAttribute key, Ga
if (record.storage instanceof IItemLockable) {
IItemLockable lockableStorage = (IItemLockable)record.storage;
if (template == null) {
template = lockableStorage;
state = !template.isItemLocked(key);
template = lockableStorage.isItemLocked(key);
state = !template;
}

for (LockAttribute attr : attributes)
Expand All @@ -332,8 +332,8 @@ public void toggleLock (EnumSet<LockAttribute> attributes, LockAttribute key, Ga

IItemLockable lockableStorage = (IItemLockable)drawer;
if (template == null) {
template = lockableStorage;
state = !template.isItemLocked(key);
template = lockableStorage.isItemLocked(key);
state = !template;
}

for (LockAttribute attr : attributes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.ImmutableList;
import com.jaquadro.minecraft.chameleon.model.CachedBuilderModel;
import com.jaquadro.minecraft.chameleon.model.PassLimitedModel;
import com.jaquadro.minecraft.chameleon.model.ProxyBuilderModel;
import com.jaquadro.minecraft.chameleon.resources.register.DefaultRegister;
import com.jaquadro.minecraft.storagedrawers.block.BlockDrawers;
Expand All @@ -18,6 +19,7 @@
import net.minecraft.client.renderer.block.model.*;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
Expand Down Expand Up @@ -89,18 +91,18 @@ protected IBakedModel buildModel (IBlockState state, IBakedModel parent) {
EnumFacing dir = state.getValue(BlockDrawers.FACING);

if (!(state instanceof IExtendedBlockState))
return parent;
return new PassLimitedModel(parent, BlockRenderLayer.CUTOUT_MIPPED);

IExtendedBlockState xstate = (IExtendedBlockState)state;
DrawerStateModelData stateModel = xstate.getValue(BlockDrawers.STATE_MODEL);

if (!DrawerDecoratorModel.shouldHandleState(stateModel))
return parent;
return new PassLimitedModel(parent, BlockRenderLayer.CUTOUT_MIPPED);

return new DrawerDecoratorModel(parent, xstate, drawer, dir, stateModel);
}
catch (Throwable t) {
return parent;
return new PassLimitedModel(parent, BlockRenderLayer.CUTOUT_MIPPED);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.jaquadro.minecraft.storagedrawers.client.model;

import com.google.common.collect.ImmutableList;
import com.jaquadro.minecraft.chameleon.model.PassLimitedModel;
import com.jaquadro.minecraft.chameleon.model.ProxyBuilderModel;
import com.jaquadro.minecraft.chameleon.resources.register.DefaultRegister;
import com.jaquadro.minecraft.storagedrawers.block.BlockCompDrawers;
Expand All @@ -17,6 +18,7 @@
import net.minecraft.client.renderer.block.model.ItemOverrideList;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.common.property.IExtendedBlockState;
Expand Down Expand Up @@ -72,18 +74,18 @@ protected IBakedModel buildModel (IBlockState state, IBakedModel parent) {
EnumFacing dir = state.getValue(BlockDrawers.FACING);

if (!(state instanceof IExtendedBlockState))
return parent;
return new PassLimitedModel(parent, BlockRenderLayer.CUTOUT_MIPPED);

IExtendedBlockState xstate = (IExtendedBlockState)state;
DrawerStateModelData stateModel = xstate.getValue(BlockDrawers.STATE_MODEL);

if (!DrawerDecoratorModel.shouldHandleState(stateModel))
return parent;
return new PassLimitedModel(parent, BlockRenderLayer.CUTOUT_MIPPED);

return new DrawerDecoratorModel(parent, xstate, drawer, dir, stateModel);
}
catch (Throwable t) {
return parent;
return new PassLimitedModel(parent, BlockRenderLayer.CUTOUT_MIPPED);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.property.IExtendedBlockState;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private void renderFastItemSet (ChamRender renderer, TileEntityDrawers tile, IBl

float alpha = 1;
if (distance > 4)
alpha = 1f - (float) ((distance - 4) / 6);
alpha = Math.max(1f - (float) ((distance - 4) / 6), 0.05f);

if (distance < 10) {
for (int i = 0; i < drawerCount; i++)
Expand Down

0 comments on commit d859e9a

Please sign in to comment.