diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceGate.java b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceGate.java
index fcc30d43d..4ccd36f55 100644
--- a/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceGate.java
+++ b/game/client/src/main/java/net/minecraft/client/render/block/model/BlockModelFenceGate.java
@@ -26,10 +26,10 @@ public class BlockModelFenceGate<T extends BlockLogicFenceGate> extends BlockMod
     public boolean render(@NotNull Tessellator tessellator, @NotNull WorldSource worldSource, int x, int y, int z) {
         AABB bounds = block.getBounds();
         boolean flag = true;
-        int l = worldSource.getBlockMetadata(x, y, z);
-        boolean flag1 = BlockLogicFenceGate.isOpen(l);
-        int i1 = BlockLogicFenceGate.getDirection(l);
-        if(i1 == 3 || i1 == 1)
+        int meta = worldSource.getBlockMetadata(x, y, z);
+        boolean isOpen = BlockLogicFenceGate.isOpen(meta);
+        int direction = BlockLogicFenceGate.getDirection(meta);
+        if(direction == 3 || direction == 1)
         {
             float f = 0.4375F;
             float f4 = 0.5625F;
@@ -54,9 +54,9 @@ public class BlockModelFenceGate<T extends BlockLogicFenceGate> extends BlockMod
             bounds.set(f1, 0.3125F, f9, f5, 1.0F, f13);
             renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
         }
-        if(!flag1)
+        if(!isOpen)
         {
-            if(i1 == 3 || i1 == 1)
+            if(direction == 3 || direction == 1)
             {
                 float f2 = 0.4375F;
                 float f6 = 0.5625F;
@@ -106,7 +106,7 @@ public class BlockModelFenceGate<T extends BlockLogicFenceGate> extends BlockMod
                 renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
             }
         } else
-        if(i1 == 3)
+        if(direction == 3)
         {
             bounds.set(0.8125F, 0.375F, 0.0F, 0.9375F, 0.9375F, 0.125F);
             renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
@@ -121,7 +121,7 @@ public class BlockModelFenceGate<T extends BlockLogicFenceGate> extends BlockMod
             bounds.set(0.5625F, 0.75F, 0.875F, 0.8125F, 0.9375F, 1.0F);
             renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
         } else
-        if(i1 == 1)
+        if(direction == 1)
         {
             bounds.set(0.0625F, 0.375F, 0.0F, 0.1875F, 0.9375F, 0.125F);
             renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
@@ -136,7 +136,7 @@ public class BlockModelFenceGate<T extends BlockLogicFenceGate> extends BlockMod
             bounds.set(0.1875F, 0.75F, 0.875F, 0.4375F, 0.9375F, 1.0F);
             renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
         } else
-        if(i1 == 0)
+        if(direction == 0)
         {
             bounds.set(0.0F, 0.375F, 0.8125F, 0.125F, 0.9375F, 0.9375F);
             renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
@@ -151,7 +151,7 @@ public class BlockModelFenceGate<T extends BlockLogicFenceGate> extends BlockMod
             bounds.set(0.875F, 0.75F, 0.5625F, 1.0F, 0.9375F, 0.8125F);
             renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
         } else
-        if(i1 == 2)
+        if(direction == 2)
         {
             bounds.set(0.0F, 0.375F, 0.0625F, 0.125F, 0.9375F, 0.1875F);
             renderBlocks.renderStandardBlock(tessellator, worldSource, this, bounds, x, y, z);
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicButtonPainted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicButtonPainted.java
index 1b9d8fa47..f3f3b3b9f 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicButtonPainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicButtonPainted.java
@@ -1,6 +1,8 @@
 package net.minecraft.core.block;
 
+import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.entity.player.Player;
+import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
@@ -8,10 +10,16 @@ import net.minecraft.core.world.World;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockLogicButtonPainted extends BlockLogicButton implements IPainted{
+    public static final int MASK_COLOR = 0b1111_0000;
     public BlockLogicButtonPainted(Block<?> block) {
         super(block);
     }
 
+    @Override
+    public ItemStack[] getBreakResult(World world, EnumDropCause dropCause, int meta, TileEntity tileEntity) {
+        return new ItemStack[] { new ItemStack(block, 1, meta & MASK_COLOR) };
+    }
+
     @Override
     public boolean canBePainted() {
         return true;
@@ -29,7 +37,7 @@ public class BlockLogicButtonPainted extends BlockLogicButton implements IPainte
 
     @Override
     public int stripColorFromMetadata(int meta) {
-        return meta & (MASK_POWERED | MASK_DIRECTION);
+        return meta & ~MASK_COLOR;
     }
 
     @Override
@@ -39,7 +47,7 @@ public class BlockLogicButtonPainted extends BlockLogicButton implements IPainte
 
     @Override
     public int getPlacedBlockMetadata(@Nullable final Player player, final ItemStack stack, final World world, final int x, final int y, final int z, final Side side, final double xPlaced, final double yPlaced) {
-        return stack.getMetadata() & ~(MASK_POWERED | MASK_DIRECTION);
+        return stack.getMetadata() & MASK_COLOR;
     }
 
     @Override
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceGate.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceGate.java
index 4812453c2..2a57af80c 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceGate.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicFenceGate.java
@@ -21,6 +21,7 @@ public class BlockLogicFenceGate extends BlockLogic implements IPaintable
 {
     public static final int MASK_DIRECTION = 0b0000_0011;
     public static final int MASK_OPEN = 0b0000_0100;
+    public static final int MASK_POWERED = 0b0000_1000;
 
     public BlockLogicFenceGate(Block<?> block)
     {
@@ -30,13 +31,13 @@ public class BlockLogicFenceGate extends BlockLogic implements IPaintable
     @Override
 	public AABB getCollisionBoundingBoxFromPool(WorldSource world, int x, int y, int z)
     {
-        int l = world.getBlockMetadata(x, y, z);
-        if(isOpen(l))
+        int metadata = world.getBlockMetadata(x, y, z);
+        if(isOpen(metadata))
         {
             return null;
         } else
         {
-        	return getAABBFromMeta(l).grow(0, 0.25f, 0).move(x, y + 0.25f, z);
+        	return getAABBFromMeta(metadata).grow(0, 0.25f, 0).move(x, y + 0.25f, z);
         }
     }
     
@@ -124,6 +125,18 @@ public class BlockLogicFenceGate extends BlockLogic implements IPaintable
         return true;
     }
 
+    @Override
+    public void onNeighborBlockChange(World world, int x, int y, int z, int blockId) {
+        int meta = world.getBlockMetadata(x, y, z);
+        boolean wasPowered = isPowered(meta);
+        boolean hasPower = world.hasNeighborSignal(x, y, z) || world.hasDirectSignal(x, y, z);
+        if (hasPower && !wasPowered) {
+            world.setBlockMetadataWithNotify(x, y, z, meta | MASK_OPEN | MASK_POWERED);
+        } else {
+            world.setBlockMetadataWithNotify(x, y, z, meta & ~(MASK_POWERED | MASK_OPEN));
+        }
+    }
+
     @Override
     public void onActivatorInteract(World world, int x, int y, int z, TileEntityActivator activator, Direction direction) {
         onBlockRightClicked(world, x, y, z, null, direction.getSide(), 0.5, 0.5);
@@ -134,6 +147,10 @@ public class BlockLogicFenceGate extends BlockLogic implements IPaintable
         return (meta & MASK_OPEN) != 0;
     }
 
+    public static boolean isPowered(int meta) {
+        return (meta & MASK_POWERED) != 0;
+    }
+
     public static int getDirection(int meta)
     {
         return meta & MASK_DIRECTION;
diff --git a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPressurePlatePainted.java b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPressurePlatePainted.java
index aa348bf85..365b84511 100644
--- a/game/core/src/main/java/net/minecraft/core/block/BlockLogicPressurePlatePainted.java
+++ b/game/core/src/main/java/net/minecraft/core/block/BlockLogicPressurePlatePainted.java
@@ -1,8 +1,10 @@
 package net.minecraft.core.block;
 
+import net.minecraft.core.block.entity.TileEntity;
 import net.minecraft.core.block.material.Material;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.player.Player;
+import net.minecraft.core.enums.EnumDropCause;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.util.helper.DyeColor;
 import net.minecraft.core.util.helper.Side;
@@ -10,10 +12,16 @@ import net.minecraft.core.world.World;
 import org.jetbrains.annotations.Nullable;
 
 public class BlockLogicPressurePlatePainted<T extends Entity> extends BlockLogicPressurePlate<T> implements IPainted{
+    public static final int MASK_COLOR = 0b1111_0000;
     public BlockLogicPressurePlatePainted(Block<?> block, Class<T> mobType, Material material) {
         super(block, mobType, material);
     }
 
+    @Override
+    public ItemStack[] getBreakResult(World world, EnumDropCause dropCause, int meta, TileEntity tileEntity) {
+        return new ItemStack[] { new ItemStack(block, 1, meta & MASK_COLOR) };
+    }
+
     @Override
     public boolean canBePainted() {
         return true;
@@ -31,7 +39,7 @@ public class BlockLogicPressurePlatePainted<T extends Entity> extends BlockLogic
 
     @Override
     public int stripColorFromMetadata(int meta) {
-        return meta & (MASK_POWERED | MASK_SIDE);
+        return meta & ~MASK_COLOR;
     }
 
     @Override
@@ -41,7 +49,7 @@ public class BlockLogicPressurePlatePainted<T extends Entity> extends BlockLogic
 
     @Override
     public int getPlacedBlockMetadata(@Nullable final Player player, final ItemStack stack, final World world, final int x, final int y, final int z, final Side side, final double xPlaced, final double yPlaced) {
-        return stack.getMetadata() & ~(MASK_POWERED | MASK_SIDE);
+        return stack.getMetadata() & MASK_COLOR;
     }
 
     @Override
