diff --git a/src/main/java/net/minecraft/client/render/block/model/BlockModelCacaoLeaves.java b/src/main/java/net/minecraft/client/render/block/model/BlockModelCacaoLeaves.java
index 59aaa2491..eb08896bf 100644
--- a/src/main/java/net/minecraft/client/render/block/model/BlockModelCacaoLeaves.java
+++ b/src/main/java/net/minecraft/client/render/block/model/BlockModelCacaoLeaves.java
@@ -1,5 +1,6 @@
 package net.minecraft.client.render.block.model;
 
+import net.minecraft.client.render.LightmapHelper;
 import net.minecraft.client.render.stitcher.IconCoordinate;
 import net.minecraft.client.render.stitcher.TextureRegistry;
 import net.minecraft.client.render.tessellator.Tessellator;
@@ -21,7 +22,19 @@ public class BlockModelCacaoLeaves<T extends Block> extends BlockModelLeaves<T>{
         super.render(tessellator, x, y, z);
 
         final int growthRate = (renderBlocks.blockAccess.getBlockMetadata(x, y, z) & 0XF0) >> 4;
-        final float brightness = getBlockBrightness(renderBlocks.blockAccess, x, y, z);
+        float brightness = 1.0f;
+        if(LightmapHelper.isLightmapEnabled()) {
+            int lmc = block.getLightmapCoord(renderBlocks.blockAccess, x, y, z);
+            if(Block.lightEmission[block.id] > 0) {
+                lmc = LightmapHelper.setBlocklightValue(lmc, 15);
+            }
+            tessellator.setLightmapCoord(lmc);
+        }else {
+            brightness = getBlockBrightness(renderBlocks.blockAccess, x, y, z);
+            if(Block.lightEmission[block.id] > 0) {
+                brightness = 1.0f;
+            }
+        }
 
         final float cNorthSouth = 0.8F;
         final float cEastWest = 0.6F;
diff --git a/src/main/java/net/minecraft/client/render/block/model/BlockModelRedstoneWire.java b/src/main/java/net/minecraft/client/render/block/model/BlockModelRedstoneWire.java
index 6f26e65b5..1629d22ae 100644
--- a/src/main/java/net/minecraft/client/render/block/model/BlockModelRedstoneWire.java
+++ b/src/main/java/net/minecraft/client/render/block/model/BlockModelRedstoneWire.java
@@ -1,5 +1,6 @@
 package net.minecraft.client.render.block.model;
 
+import net.minecraft.client.render.LightmapHelper;
 import net.minecraft.client.render.stitcher.IconCoordinate;
 import net.minecraft.client.render.stitcher.TextureRegistry;
 import net.minecraft.client.render.tessellator.Tessellator;
@@ -24,7 +25,20 @@ public class BlockModelRedstoneWire<T extends Block> extends BlockModelStandard<
         {
             wireCross = renderBlocks.overrideBlockTexture;
         }
-        float brightness = getBlockBrightness(renderBlocks.blockAccess, x, y, z);
+        float brightness = 1.0f;
+        if(LightmapHelper.isLightmapEnabled()) {
+            int lmc = block.getLightmapCoord(renderBlocks.blockAccess, x, y, z);
+            if(Block.lightEmission[block.id] > 0) {
+                lmc = LightmapHelper.setBlocklightValue(lmc, 15);
+            }
+            tessellator.setLightmapCoord(lmc);
+        }else {
+            brightness = getBlockBrightness(renderBlocks.blockAccess, x, y, z);
+            if(Block.lightEmission[block.id] > 0) {
+                brightness = 1.0f;
+            }
+        }
+        tessellator.setColorOpaque_F(brightness, brightness, brightness);
 
         Color color = Colors.allRedstoneColors[meta & 0xF];
         float red = color.getRed() / 255.0f;
diff --git a/src/main/java/net/minecraft/client/render/block/model/BlockModelRepeater.java b/src/main/java/net/minecraft/client/render/block/model/BlockModelRepeater.java
index 4c53551ab..238cb4581 100644
--- a/src/main/java/net/minecraft/client/render/block/model/BlockModelRepeater.java
+++ b/src/main/java/net/minecraft/client/render/block/model/BlockModelRepeater.java
@@ -19,6 +19,26 @@ public class BlockModelRepeater extends BlockModelStandard<BlockRedstoneRepeater
         block.setBlockBoundsBasedOnState(renderBlocks.blockAccess, x, y, z);
         int meta = renderBlocks.blockAccess.getBlockMetadata(x, y, z);
         int i1 = meta & 3;
+
+        switch(i1)
+        {
+            case 0: // '\0'
+                renderBlocks.uvRotateTop = 0;
+                break;
+
+            case 2: // '\002'
+                renderBlocks.uvRotateTop = 3;
+                break;
+
+            case 3: // '\003'
+                renderBlocks.uvRotateTop = 2;
+                break;
+
+            case 1: // '\001'
+                renderBlocks.uvRotateTop = 1;
+                break;
+        }
+
         int j1 = (meta & 0xc) >> 2;
         renderStandardBlock(tessellator, block, x, y, z);
         float brightness = 1.0f;
diff --git a/src/main/java/net/minecraft/core/entity/EntityPainting.java b/src/main/java/net/minecraft/core/entity/EntityPainting.java
index da621a032..dc866ae63 100644
--- a/src/main/java/net/minecraft/core/entity/EntityPainting.java
+++ b/src/main/java/net/minecraft/core/entity/EntityPainting.java
@@ -329,7 +329,7 @@ public class EntityPainting extends Entity
     public void setStack(ItemStack stack){
         borderStack = stack;
         if (Global.isServer){
-            MinecraftServer.getInstance().playerList.sendPacketToAllPlayers(new Packet25EntityPainting(this));
+            MinecraftServer.getInstance().playerList.sendPacketToAllPlayersInDimension(new Packet25EntityPainting(this), world.dimension.id);
         }
     }
     private static final HashMap<String, NamespaceID> borderMaterialMap = new HashMap<>();
diff --git a/src/main/java/net/minecraft/core/item/ItemWandSpawner.java b/src/main/java/net/minecraft/core/item/ItemWandSpawner.java
index f4f6b6b4c..937bf320c 100644
--- a/src/main/java/net/minecraft/core/item/ItemWandSpawner.java
+++ b/src/main/java/net/minecraft/core/item/ItemWandSpawner.java
@@ -1,13 +1,17 @@
 package net.minecraft.core.item;
 
+import net.minecraft.core.HitResult;
 import net.minecraft.core.block.BlockDispenser;
 import net.minecraft.core.entity.Entity;
 import net.minecraft.core.entity.EntityDispatcher;
 import net.minecraft.core.entity.EntityLiving;
 import net.minecraft.core.entity.player.EntityPlayer;
 import net.minecraft.core.player.gamemode.Gamemode;
+import net.minecraft.core.util.helper.MathHelper;
 import net.minecraft.core.util.helper.Side;
+import net.minecraft.core.util.phys.Vec3d;
 import net.minecraft.core.world.World;
+import net.minecraft.server.entity.player.EntityPlayerMP;
 
 import java.util.Random;
 
@@ -19,13 +23,42 @@ public class ItemWandSpawner
         super(name, id);
     }
     @Override
-    public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
+    public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player)
     {
-        if (entityplayer.gamemode != Gamemode.creative){
-            entityplayer.sendTranslatedChatMessage("wand.wrongmode");
+        if (player.gamemode != Gamemode.creative){
+            player.sendTranslatedChatMessage("wand.wrongmode");
             return itemstack;
         }
-        entityplayer.displayGUIWandMonsterPicker(itemstack);
+
+        if (!player.isSneaking()){
+            float f = 1.0F;
+            float f1 = player.xRotO + (player.xRot - player.xRotO) * f;
+            float f2 = player.yRotO + (player.yRot - player.yRotO) * f;
+            double posX = player.xo + (player.x - player.xo) * (double) f;
+            float yOff = player instanceof EntityPlayerMP ? player.getHeightOffset() : 0;
+            double posY = (player.yo + (player.y - player.yo)) + yOff;
+            double posZ = player.zo + (player.z - player.zo) * (double) f;
+            Vec3d vec3d = Vec3d.createVector(posX, posY, posZ);
+            float f3 = MathHelper.cos(-f2 * 0.01745329F - MathHelper.PI);
+            float f4 = MathHelper.sin(-f2 * 0.01745329F - MathHelper.PI);
+            float f5 = -MathHelper.cos(-f1 * 0.01745329F);
+            float f6 = MathHelper.sin(-f1 * 0.01745329F);
+            float f7 = f4 * f5;
+            float f8 = f6;
+            float f9 = f3 * f5;
+            double reachDistance = player.getGamemode().getBlockReachDistance();
+            Vec3d vec3d1 = vec3d.addVector((double) f7 * reachDistance, (double) f8 * reachDistance, (double) f9 * reachDistance);
+            HitResult rayTraceResult = world.checkBlockCollisionBetweenPoints(vec3d, vec3d1, false);
+
+            if (rayTraceResult != null){
+                if (!world.isClientSide){
+                    spawnEntity(itemstack, world, rayTraceResult.location.xCoord, rayTraceResult.location.yCoord, rayTraceResult.location.zCoord);
+                }
+                return itemstack;
+            }
+        }
+
+        player.displayGUIWandMonsterPicker(itemstack);
 
         return itemstack;
     }
@@ -37,33 +70,10 @@ public class ItemWandSpawner
         }
         return id;
     }
-
-    @Override
-    public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int blockX, int blockY, int blockZ, Side side, double xPlaced, double yPlaced)
-    {
-        if (entityplayer.gamemode != Gamemode.creative){
-            entityplayer.sendTranslatedChatMessage("wand.wrongmode");
-            return false;
-        }
-        if (!world.isClientSide){
-            Entity entity = EntityDispatcher.createEntityInWorld(getEntityId(itemstack), world);
-            if (entity != null){
-                entity.setPos(blockX + side.getOffsetX() + 0.5f, blockY + side.getOffsetY(), blockZ + side.getOffsetZ() + 0.5f);
-                entity.spawnInit();
-                if (itemstack.hasCustomName() && entity instanceof EntityLiving){
-                    ((EntityLiving)entity).setNickname(itemstack.getCustomName());
-                }
-                world.entityJoinedWorld(entity);
-            }
-        }
-        return true;
-    }
-
-    @Override
-    public void onDispensed(ItemStack itemStack, World world, double x, double y, double z, int xOffset, int zOffset, Random random) {
+    public void spawnEntity(ItemStack itemStack, World world, double x, double y, double z){
         Entity entity = EntityDispatcher.createEntityInWorld(getEntityId(itemStack), world);
         if (entity != null){
-            entity.setPos(x + xOffset * 0.5, y, z + zOffset * 0.5);
+            entity.setPos(x, y, z);
             entity.spawnInit();
             if (itemStack.hasCustomName() && entity instanceof EntityLiving){
                 ((EntityLiving)entity).setNickname(itemStack.getCustomName());
@@ -71,6 +81,10 @@ public class ItemWandSpawner
             world.entityJoinedWorld(entity);
         }
     }
+    @Override
+    public void onDispensed(ItemStack itemStack, World world, double x, double y, double z, int xOffset, int zOffset, Random random) {
+        spawnEntity(itemStack, world, x + xOffset * 0.5, y, z + zOffset * 0.5);
+    }
 
     @Override
     public boolean isRemovedOnDispense() {
diff --git a/src/main/java/net/minecraft/core/world/World.java b/src/main/java/net/minecraft/core/world/World.java
index 621d320b8..b53887f60 100644
--- a/src/main/java/net/minecraft/core/world/World.java
+++ b/src/main/java/net/minecraft/core/world/World.java
@@ -67,6 +67,7 @@ import net.minecraft.core.world.type.WorldType;
 import net.minecraft.core.world.type.WorldTypes;
 import net.minecraft.core.world.weather.Weather;
 import net.minecraft.core.world.weather.WeatherManager;
+import org.jetbrains.annotations.Nullable;
 
 public class World implements WorldSource {
 
@@ -1127,16 +1128,19 @@ public class World implements WorldSource {
         return skyDarken < 4;
     }
 
+    @Nullable
     public HitResult checkBlockCollisionBetweenPoints(Vec3d start, Vec3d end)
     {
         return checkBlockCollisionBetweenPoints(start, end, false, false);
     }
 
+    @Nullable
     public HitResult checkBlockCollisionBetweenPoints(Vec3d start, Vec3d end, boolean shouldCollideWithFluids)
     {
         return checkBlockCollisionBetweenPoints(start, end, shouldCollideWithFluids, false);
     }
 
+    @Nullable
     public HitResult checkBlockCollisionBetweenPoints(Vec3d start, Vec3d end, boolean shouldCollideWithFluids, boolean flag1)
     {
         if(Double.isNaN(start.xCoord) || Double.isNaN(start.yCoord) || Double.isNaN(start.zCoord))
