Apply security card texture, fix crafter textures and add wireless fluid grid, small network / wireless transmitter GUI tweak
@@ -8,6 +8,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.EnumActionResult;
|
import net.minecraft.util.EnumActionResult;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
@@ -23,6 +24,8 @@ public class ItemSecurityCard extends ItemBase {
|
|||||||
super("security_card");
|
super("security_card");
|
||||||
|
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
|
|
||||||
|
addPropertyOverride(new ResourceLocation("active"), (stack, world, entity) -> (entity != null && isValid(stack)) ? 1.0f : 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -66,6 +69,10 @@ public class ItemSecurityCard extends ItemBase {
|
|||||||
stack.getTagCompound().setBoolean(String.format(NBT_PERMISSION, permission.getId()), state);
|
stack.getTagCompound().setBoolean(String.format(NBT_PERMISSION, permission.getId()), state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isValid(ItemStack stack) {
|
||||||
|
return stack.hasTagCompound() && stack.getTagCompound().hasKey(NBT_OWNER);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced) {
|
||||||
super.addInformation(stack, player, tooltip, advanced);
|
super.addInformation(stack, player, tooltip, advanced);
|
||||||
|
|||||||
@@ -1,6 +1,21 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"parent": "item/generated",
|
"parent": "item/generated",
|
||||||
"textures": {
|
"textures": {
|
||||||
"layer0": "refinedstorage:items/security_card"
|
"layer0": "refinedstorage:items/security_card_inactive"
|
||||||
|
},
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"predicate": {
|
||||||
|
"active": 0
|
||||||
|
},
|
||||||
|
"model": "refinedstorage:item/security_card_inactive"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"predicate": {
|
||||||
|
"active": 1
|
||||||
|
},
|
||||||
|
"model": "refinedstorage:item/security_card_active"
|
||||||
}
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "refinedstorage:items/security_card_active"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "refinedstorage:items/security_card_inactive"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 758 B After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 767 B After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 761 B After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 231 B |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 1.3 KiB |