diff --git a/src/main/java/net/minecraft/client/Minecraft.java b/src/main/java/net/minecraft/client/Minecraft.java
index 3841e2e43..44fd0e8b2 100644
--- a/src/main/java/net/minecraft/client/Minecraft.java
+++ b/src/main/java/net/minecraft/client/Minecraft.java
@@ -2229,6 +2229,9 @@ public class Minecraft
             }
         }
         theWorld = world;
+        if(theWorld != null) {
+            Colorizers.update(true);
+        }
         if(world != null)
         {
             playerController.initWorld(world);
@@ -2285,9 +2288,6 @@ public class Minecraft
             loadingScreen.progressStop();
         }
         worldRenderer.lightmapHelper.setup();
-        if(theWorld != null) {
-        	Colorizers.update(true);	
-        }
     }
 
     private void convertSaveVersion(int fromVersion, String worldDirName, String worldName)
diff --git a/src/main/java/net/minecraft/client/gui/container/AbstractContainerScreen.java b/src/main/java/net/minecraft/client/gui/container/AbstractContainerScreen.java
index cd35d8330..44adc4f96 100644
--- a/src/main/java/net/minecraft/client/gui/container/AbstractContainerScreen.java
+++ b/src/main/java/net/minecraft/client/gui/container/AbstractContainerScreen.java
@@ -2,6 +2,7 @@
 package net.minecraft.client.gui.container;
 
 import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.ButtonElement;
 import net.minecraft.client.gui.ItemElement;
 import net.minecraft.client.gui.Screen;
 import net.minecraft.client.gui.TooltipElement;
@@ -28,6 +29,7 @@ import net.minecraft.core.player.inventory.menu.*;
 import net.minecraft.core.player.inventory.slot.Slot;
 import net.minecraft.core.player.inventory.slot.ResultSlot;
 import net.minecraft.core.player.inventory.slot.CreativeSlot;
+import net.minecraft.core.sound.SoundCategory;
 import org.lwjgl.input.Keyboard;
 import org.lwjgl.opengl.GL11;
 
@@ -297,7 +299,12 @@ public abstract class AbstractContainerScreen extends Screen
 		if(!mc.thePlayer.getGamemode().consumeBlocks()) {
 			// Duplicate items with middle mouse button
 			if(mouseButton == 2) {
-				mc.playerController.handleInventoryMouseClick(inventorySlots.containerId, InventoryAction.CREATIVE_GRAB, new int[] {slotId, 64}, mc.thePlayer);
+				Slot slot = inventorySlots.getSlot(slotId);
+				if (slot.getItem() == null) {
+					mc.playerController.handleInventoryMouseClick(inventorySlots.containerId, InventoryAction.SORT, new int[] {slotId, 64}, mc.thePlayer);
+				} else {
+					mc.playerController.handleInventoryMouseClick(inventorySlots.containerId, InventoryAction.CREATIVE_GRAB, new int[] {slotId, 64}, mc.thePlayer);
+				}
 				return;
 			}
 		}
diff --git a/src/main/java/net/minecraft/client/gui/container/ActivatorScreen.java b/src/main/java/net/minecraft/client/gui/container/ActivatorScreen.java
index d280e7c08..a5cc2d3f6 100644
--- a/src/main/java/net/minecraft/client/gui/container/ActivatorScreen.java
+++ b/src/main/java/net/minecraft/client/gui/container/ActivatorScreen.java
@@ -2,6 +2,7 @@ package net.minecraft.client.gui.container;
 
 import net.minecraft.client.gui.ButtonElement;
 import net.minecraft.client.gui.modelviewer.elements.ListenerButtonElement;
+import net.minecraft.core.InventoryAction;
 import net.minecraft.core.block.entity.ActivatorBlockEntity;
 import net.minecraft.core.lang.I18n;
 import net.minecraft.core.player.inventory.container.Inventory;
@@ -39,11 +40,11 @@ public class ActivatorScreen extends AbstractContainerScreen {
     }
 
     @Override
-    public void mouseClicked(int mx, int my, int buttonNum) {
-        if (buttonNum == 1 && mc.thePlayer.inventory.getHeldItemStack() == null) {
+    public void clickInventory(int x, int y, int mouseButton) {
+        if (mouseButton == 1 && mc.thePlayer.inventory.getHeldItemStack() == null) {
             for (ButtonElement button : slotButtons) {
-                if (activatorBlockEntity.getItem(button.id) == null && button.mouseClicked(mc, mx, my)) {
-                    activatorBlockEntity.lockSlot(button.id, !activatorBlockEntity.locked(button.id));
+                if (activatorBlockEntity.getItem(button.id) == null && button.mouseClicked(mc, x, y)) {
+                    mc.playerController.handleInventoryMouseClick(inventorySlots.containerId, InventoryAction.LOCK, new int[] {button.id, 0}, mc.thePlayer);
                     if (button.playSound) {
                         mc.sndManager.playSound("random.click", SoundCategory.GUI_SOUNDS, 1.0F, 1.0F);
                     }
@@ -51,7 +52,7 @@ public class ActivatorScreen extends AbstractContainerScreen {
                 }
             }
         }
-        super.mouseClicked(mx, my, buttonNum);
+        super.clickInventory(x, y, mouseButton);
     }
 
     @Override
diff --git a/src/main/java/net/minecraft/client/gui/container/FurnaceScreen.java b/src/main/java/net/minecraft/client/gui/container/FurnaceScreen.java
index ba4e905d4..ff31311ca 100644
--- a/src/main/java/net/minecraft/client/gui/container/FurnaceScreen.java
+++ b/src/main/java/net/minecraft/client/gui/container/FurnaceScreen.java
@@ -11,10 +11,10 @@ import org.lwjgl.opengl.GL11;
 public class FurnaceScreen extends AbstractContainerScreen
 {
 
-    public FurnaceScreen(Inventory inventoryplayer, FurnaceBlockEntity tileentityfurnace)
+    public FurnaceScreen(Inventory inventory, FurnaceBlockEntity furnaceBlockEntity)
     {
-        super(new FurnaceMenu(inventoryplayer, tileentityfurnace));
-        furnaceInventory = tileentityfurnace;
+        super(new FurnaceMenu(inventory, furnaceBlockEntity));
+        furnaceInventory = furnaceBlockEntity;
     }
 
     @Override
diff --git a/src/main/java/net/minecraft/client/render/MapItemRenderer.java b/src/main/java/net/minecraft/client/render/MapItemRenderer.java
index 1f14956ad..bfe12dd81 100644
--- a/src/main/java/net/minecraft/client/render/MapItemRenderer.java
+++ b/src/main/java/net/minecraft/client/render/MapItemRenderer.java
@@ -117,17 +117,17 @@ public class MapItemRenderer
         textureManager.bindTexture(textureManager.loadTexture("/assets/minecraft/textures/misc/mapicons.png"));
         for(Iterator<ItemMapSavedData.MapDecoration> iterator = data.decorations.iterator(); iterator.hasNext(); GL11.glPopMatrix())
         {
-            ItemMapSavedData.MapDecoration mapcoord = iterator.next();
+            ItemMapSavedData.MapDecoration decoration = iterator.next();
             GL11.glPushMatrix();
-            GL11.glTranslatef((float)j + (float)mapcoord.x / 2.0F + 64F, (float)k + (float)mapcoord.y / 2.0F + 64F, -0.02F);
-            GL11.glRotatef((float)(mapcoord.rot * 360) / 16F, 0.0F, 0.0F, 1.0F);
+            GL11.glTranslatef((float)j + (float)decoration.x / 2.0F + 64F, (float)k + (float)decoration.y / 2.0F + 64F, -0.02F);
+            GL11.glRotatef((decoration.rot * 360F) / ItemMapSavedData.MapDecoration.ROTATION_STEPS, 0.0F, 0.0F, 1.0F);
             GL11.glScalef(4F, 4F, 3F);
             GL11.glTranslatef(-0.125F, 0.125F, 0.0F);
             double zIndex = -1.0d;
-            float f1 = (float)(mapcoord.type % 4) / 4F;
-            float f2 = (float)(mapcoord.type / 4) / 4F;
-            float f3 = (float)(mapcoord.type % 4 + 1) / 4F;
-            float f4 = (float)(mapcoord.type / 4 + 1) / 4F;
+            float f1 = (float)(decoration.type % 4) / 4F;
+            float f2 = (float)(decoration.type / 4) / 4F;
+            float f3 = (float)(decoration.type % 4 + 1) / 4F;
+            float f4 = (float)(decoration.type / 4 + 1) / 4F;
 
             tessellator.startDrawingQuads();
             tessellator.addVertexWithUV(-1D, 1.0D, zIndex, f1, f2);
diff --git a/src/main/java/net/minecraft/client/render/RenderGlobal.java b/src/main/java/net/minecraft/client/render/RenderGlobal.java
index 60ad6400f..10a5c7881 100644
--- a/src/main/java/net/minecraft/client/render/RenderGlobal.java
+++ b/src/main/java/net/minecraft/client/render/RenderGlobal.java
@@ -21,6 +21,7 @@ import net.minecraft.core.block.entity.BlockEntity;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.MusicDiscItem;
 import net.minecraft.core.lang.I18n;
+import net.minecraft.core.util.helper.Color;
 import net.minecraft.core.util.helper.Direction;
 import net.minecraft.core.util.phys.HitResult;
 import net.minecraft.core.block.Block;
@@ -43,8 +44,8 @@ import net.minecraft.core.world.weather.Weathers;
 import org.lwjgl.opengl.ARBOcclusionQuery;
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.opengl.GL15;
+import org.useless.stellar.StarUtil;
 
-import java.awt.*;
 import java.nio.IntBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -112,11 +113,7 @@ public class RenderGlobal
 
         // Set up call list for stars
         starGLCallList = GLAllocation.generateDisplayLists(3);
-        GL11.glPushMatrix();
-        GL11.glNewList(starGLCallList, GL11.GL_COMPILE);
-        setupStarsCallList();
-        GL11.glEndList();
-        GL11.glPopMatrix();
+        updateStars();
 
         // Set up call list for sky
         Tessellator tessellator = Tessellator.instance;
@@ -140,9 +137,18 @@ public class RenderGlobal
         GL11.glEndList();
     }
 
+    public void updateStars() {
+        GL11.glPushMatrix();
+        GL11.glNewList(starGLCallList, GL11.GL_COMPILE);
+        setupStarsCallList();
+        GL11.glEndList();
+        GL11.glPopMatrix();
+    }
+
     private void setupStarsCallList()
     {
         Random random = new Random(10842L);
+        Random colorRandom = new Random(10842L); // Created a second random so the new color don't change the positions of the stars
         Tessellator tessellator = Tessellator.instance;
         tessellator.startDrawingQuads();
         for(int i = 0; i < 1500; i++)
@@ -172,6 +178,10 @@ public class RenderGlobal
             double d14 = random.nextDouble() * Math.PI * 2D;
             double d15 = java.lang.Math.sin(d14);
             double d16 = java.lang.Math.cos(d14);
+
+            int starColor = Colorizers.stars.getDefaultColor(colorRandom.nextDouble(), 1); /*StarUtil.getStarColorFromTemp(1000 + colorRandom.nextInt(17500));*/
+            tessellator.setColorOpaque(Color.redFromInt(starColor)/4 + 32, Color.greenFromInt(starColor)/4 + 32, Color.blueFromInt(starColor)/4 + 32);
+
             for(int j = 0; j < 4; j++)
             {
                 double d17 = 0.0D;
@@ -217,6 +227,7 @@ public class RenderGlobal
     }
     public void loadRenderers()
     {
+        updateStars();
         // Delete all display lists - this is a (hopefully temporary) workaround to AMD's OpenGL driver leaking memory
         // See https://community.amd.com/t5/opengl-vulkan/high-vram-consumption-in-minecraft/m-p/607299
         deleteRenderListBase();
@@ -950,7 +961,7 @@ public class RenderGlobal
             final int iterations = 10;
             for (int i = 0; i < iterations; i++) {
                 size = 200F - i * 4;
-                int color = Color.HSBtoRGB(i/(float)iterations, 1, (float) (0.3f * rainbowBrightness));
+                int color = java.awt.Color.HSBtoRGB(i/(float)iterations, 1, (float) (0.3f * rainbowBrightness));
                 float colR = ((color >> 16) & 0xFF)/255f;
                 float colG = ((color >>  8) & 0xFF)/255f;
                 float colB = ((color >>  0) & 0xFF)/255f;
diff --git a/src/main/java/net/minecraft/client/render/colorizer/Colorizers.java b/src/main/java/net/minecraft/client/render/colorizer/Colorizers.java
index b33ce4ee2..b0b69bfdd 100644
--- a/src/main/java/net/minecraft/client/render/colorizer/Colorizers.java
+++ b/src/main/java/net/minecraft/client/render/colorizer/Colorizers.java
@@ -29,6 +29,7 @@ public class Colorizers {
 	public static Colorizer grass;
 	public static Colorizer water;
 	public static Colorizer sky;
+	public static Colorizer stars;
 	public static Colorizer fog;
 	public static Colorizer oak;
 	public static Colorizer birch;
@@ -71,6 +72,7 @@ public class Colorizers {
 		grass = add(new Colorizer("grass"));
 		water = add(new Colorizer("water"));
 		sky = add(new Colorizer("sky"));
+		stars = add(new Colorizer("stars"));
 		fog = add(new Colorizer("fog"));
 		oak = add(new Colorizer("oak"));
 		birch = add(new Colorizer("birch"));
diff --git a/src/main/java/net/minecraft/client/render/entity/PlayerRenderer.java b/src/main/java/net/minecraft/client/render/entity/PlayerRenderer.java
index f4293f672..aed78ad36 100644
--- a/src/main/java/net/minecraft/client/render/entity/PlayerRenderer.java
+++ b/src/main/java/net/minecraft/client/render/entity/PlayerRenderer.java
@@ -56,18 +56,24 @@ public class PlayerRenderer extends MobRenderer<Player>
             GL11.glColor4f(1f, 1f, 1f, 0.0f);
         }
         ItemStack itemstack = player.inventory.armorItemInSlot(IArmorItem.PIECE_HEAD);
-        if(itemstack != null && itemstack.getItem().id < Block.blocksList.length)
+        if(itemstack != null)
         {
             GL11.glPushMatrix();
             modelBipedMain.head.translateTo(0.0625F);
-            if(BlockModelDispatcher.getInstance().getDispatch(Block.blocksList[itemstack.itemID]).shouldItemRender3d())
+            if(itemstack.itemID < Block.blocksList.length && BlockModelDispatcher.getInstance().getDispatch(Block.getBlock(itemstack.itemID)).shouldItemRender3d())
             {
-                float f1 = 0.625F;
+                float scale = 0.625F;
                 GL11.glTranslatef(0.0F, -0.25F, 0.0F);
                 GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
-                GL11.glScalef(f1, -f1, f1);
+                GL11.glScalef(scale, -scale, scale);
+                ItemModelDispatcher.getInstance().getDispatch(itemstack).renderItem(Tessellator.instance, renderDispatcher.itemRenderer, player, itemstack);
+            } else {
+                float scale = 0.625F;
+                GL11.glTranslatef(0.0F, -0.8F, 0.0F);
+                GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
+                GL11.glScalef(scale, scale, scale);
+                ItemModelDispatcher.getInstance().getDispatch(itemstack).renderItemInWorld(Tessellator.instance, player, itemstack, player.getBrightness(partialTick), 1f, true);
             }
-            ItemModelDispatcher.getInstance().getDispatch(itemstack).renderItem(Tessellator.instance, renderDispatcher.itemRenderer, player, itemstack);
             GL11.glPopMatrix();
         }
 
diff --git a/src/main/java/net/minecraft/core/InventoryAction.java b/src/main/java/net/minecraft/core/InventoryAction.java
index bcdc09286..217dc78f6 100644
--- a/src/main/java/net/minecraft/core/InventoryAction.java
+++ b/src/main/java/net/minecraft/core/InventoryAction.java
@@ -32,13 +32,15 @@ public enum InventoryAction {
 	EQUIP_ARMOR(false),			// Equip armor
 
 	SORT(false),				// Sort inventory
+
+	LOCK(false), 				// Locks slot, only currently used in the activator
 	
 	// Creative actions only work in creative mode! The check is in the Container.clickInventorySlot
 	CREATIVE_GRAB(true),		// Duplicate hovered item and grab it
 	CREATIVE_MOVE(true),		// Duplicate hovered item and add it to inventory
 	CREATIVE_DELETE(true),		// Delete item from hovered slot
 	CREATIVE_DRAG(true),		// Duplicate held item into all dragged slots
-	
+
 	//TODO implement
 //	GRAB_STACK			// Move a stack from the other inventory into the current inventory
 //	GRAB_SINGLE_ITEM	// Move a single item from the other inventory into the current inventory (mouse wheel?)
@@ -84,6 +86,8 @@ public enum InventoryAction {
 		setId(EQUIP_ARMOR, 18);
 
 		setId(SORT, 19);
+
+		setId(LOCK, 20);
 	}
 	
 	private static void setId(InventoryAction action, int id) {
diff --git a/src/main/java/net/minecraft/core/block/TorchBlock.java b/src/main/java/net/minecraft/core/block/TorchBlock.java
index 3fb4e37ea..31b1bd706 100644
--- a/src/main/java/net/minecraft/core/block/TorchBlock.java
+++ b/src/main/java/net/minecraft/core/block/TorchBlock.java
@@ -87,7 +87,7 @@ public class TorchBlock extends Block
 
     @Override
     public void onBlockPlacedByMob(World world, int x, int y, int z, @NotNull Side side, Mob mob, double xPlaced, double yPlaced) {
-        int orientation = SIDE_BOTTOM;
+        int orientation = SIDE_NONE;
         switch (side) {
             case TOP:
                 if(canPlaceOnTop(world, x, y - 1, z))
@@ -120,7 +120,11 @@ public class TorchBlock extends Block
                 }
                 break;
         }
+        if (orientation == SIDE_NONE) {
+            orientation = getDefaultOrientation(world, x, y, z);
+        }
         world.setBlockMetadataWithNotify(x, y, z, orientation);
+        dropTorchIfCantStay(world, x, y, z);
     }
 
     @Override
@@ -159,7 +163,34 @@ public class TorchBlock extends Block
                 }
                 break;
         }
+        if (orientation == SIDE_NONE) {
+            orientation = getDefaultOrientation(world, x, y, z);
+        }
         world.setBlockMetadataWithNotify(x, y, z, orientation);
+        dropTorchIfCantStay(world, x, y, z);
+    }
+
+    public int getDefaultOrientation(World world, int x, int y, int z) {
+        if (canPlaceOnTop(world, x, y - 1, z)) {
+            return SIDE_BOTTOM;
+        }
+        if(world.isBlockNormalCube(x, y, z + 1))
+        {
+            return SIDE_SOUTH;
+        }
+        if(world.isBlockNormalCube(x, y, z - 1))
+        {
+            return SIDE_NORTH;
+        }
+        if(world.isBlockNormalCube(x + 1, y, z))
+        {
+            return SIDE_EAST;
+        }
+        if(world.isBlockNormalCube(x - 1, y, z))
+        {
+            return SIDE_WEST;
+        }
+        return SIDE_NONE;
     }
     
     @Override
diff --git a/src/main/java/net/minecraft/core/block/entity/ActivatorBlockEntity.java b/src/main/java/net/minecraft/core/block/entity/ActivatorBlockEntity.java
index 5676b4578..f7f773848 100644
--- a/src/main/java/net/minecraft/core/block/entity/ActivatorBlockEntity.java
+++ b/src/main/java/net/minecraft/core/block/entity/ActivatorBlockEntity.java
@@ -19,7 +19,7 @@ public class ActivatorBlockEntity extends BlockEntity implements Container {
     public static final int CONTAINER_SIZE = 9;
     private ItemStack[] dispenserContents;
     private final Random random;
-    protected short lockedSlotBitSet;
+    public short lockedSlotBitSet;
     public int stackSelector = 0;
 
     public ActivatorBlockEntity()
diff --git a/src/main/java/net/minecraft/core/block/entity/FurnaceBlockEntity.java b/src/main/java/net/minecraft/core/block/entity/FurnaceBlockEntity.java
index 7f42cf2cd..0ad75e482 100644
--- a/src/main/java/net/minecraft/core/block/entity/FurnaceBlockEntity.java
+++ b/src/main/java/net/minecraft/core/block/entity/FurnaceBlockEntity.java
@@ -20,6 +20,8 @@ import net.minecraft.core.entity.ItemEntity;
 import net.minecraft.core.entity.player.Player;
 import net.minecraft.core.item.Items;
 import net.minecraft.core.item.ItemStack;
+import net.minecraft.core.net.packet.BlockEntityDataPacket;
+import net.minecraft.core.net.packet.Packet;
 import net.minecraft.core.player.inventory.container.Container;
 import net.minecraft.core.util.helper.Side;
 import net.minecraft.core.world.World;
@@ -373,6 +375,11 @@ public class FurnaceBlockEntity extends BlockEntity
         }
     }
 
+    @Override
+    public Packet getDescriptionPacket() {
+        return new BlockEntityDataPacket(this);
+    }
+
     @Override
     public void sortContainer() {
         // Do nothing
diff --git a/src/main/java/net/minecraft/core/block/entity/GoldMeshBlockEntity.java b/src/main/java/net/minecraft/core/block/entity/GoldMeshBlockEntity.java
index 6a4366a6f..144e26cab 100644
--- a/src/main/java/net/minecraft/core/block/entity/GoldMeshBlockEntity.java
+++ b/src/main/java/net/minecraft/core/block/entity/GoldMeshBlockEntity.java
@@ -37,9 +37,11 @@ public class GoldMeshBlockEntity extends BlockEntity {
         if (stack != null) {
             stack.consumeItem(player);
             filterItem = new ItemStack(stack.getItem(), 1, stack.getMetadata(), stack.getData());
+            setChanged();
             return true;
         }
         filterItem = null;
+        setChanged();
         return success | !wasNull;
     }
     @Override
@@ -48,6 +50,8 @@ public class GoldMeshBlockEntity extends BlockEntity {
         super.readFromNBT(compoundTag);
         if (compoundTag.getBoolean("hasItem")){
             filterItem = ItemStack.readItemStackFromNbt(compoundTag.getCompound("item"));
+        } else {
+            filterItem = null;
         }
     }
 
@@ -60,10 +64,6 @@ public class GoldMeshBlockEntity extends BlockEntity {
             compoundTag.putBoolean("hasItem", true);
         }
     }
-    @Override
-    public Packet getDescriptionPacket() {
-        return new BlockEntityDataPacket(this);
-    }
 
     @Override
     public void dropContents(World world, int x, int y, int z) {
@@ -76,4 +76,9 @@ public class GoldMeshBlockEntity extends BlockEntity {
             item.pickupDelay = 0;
         }
     }
+
+    @Override
+    public Packet getDescriptionPacket() {
+        return new BlockEntityDataPacket(this);
+    }
 }
diff --git a/src/main/java/net/minecraft/core/item/MapItem.java b/src/main/java/net/minecraft/core/item/MapItem.java
index ceff4dace..bf334d9c3 100644
--- a/src/main/java/net/minecraft/core/item/MapItem.java
+++ b/src/main/java/net/minecraft/core/item/MapItem.java
@@ -160,10 +160,10 @@ public class MapItem extends Item implements IComplexItem
 			discoverRadius /= 2;
 		}
 		
-		data.step++;
+		data.tick++;
 		
 		for (int x = (entityOnMapX - discoverRadius) + 1; x < entityOnMapX + discoverRadius; x++) {
-			if((x & 0xf) != (data.step & 0xf)) {
+			if((x & 0xf) != (data.tick & 0xf)) {
 				continue;
 			}
 			int minZ = 255;
diff --git a/src/main/java/net/minecraft/core/net/packet/BlockEntityDataPacket.java b/src/main/java/net/minecraft/core/net/packet/BlockEntityDataPacket.java
index fe9288124..0f558d40c 100644
--- a/src/main/java/net/minecraft/core/net/packet/BlockEntityDataPacket.java
+++ b/src/main/java/net/minecraft/core/net/packet/BlockEntityDataPacket.java
@@ -24,6 +24,10 @@ public class BlockEntityDataPacket
         blockEntity.writeToNBT(tag);
     }
 
+    public BlockEntityDataPacket(CompoundTag tag) {
+        this.tag = tag;
+    }
+
     @Override
     public void read(DataInputStream dis)
             throws IOException
diff --git a/src/main/java/net/minecraft/core/player/inventory/InventorySorter.java b/src/main/java/net/minecraft/core/player/inventory/InventorySorter.java
index 8b00c8082..1136e185c 100644
--- a/src/main/java/net/minecraft/core/player/inventory/InventorySorter.java
+++ b/src/main/java/net/minecraft/core/player/inventory/InventorySorter.java
@@ -70,7 +70,7 @@ public abstract class InventorySorter {
             final int bId = b.itemID;
 
             if (aId == bId) {
-                return a.stackSize - b.stackSize;
+                return b.stackSize - a.stackSize;
             }
             if (aId < bId) {
                 return -1;
diff --git a/src/main/java/net/minecraft/core/player/inventory/menu/ActivatorMenu.java b/src/main/java/net/minecraft/core/player/inventory/menu/ActivatorMenu.java
index e12b597ff..1cac96c46 100644
--- a/src/main/java/net/minecraft/core/player/inventory/menu/ActivatorMenu.java
+++ b/src/main/java/net/minecraft/core/player/inventory/menu/ActivatorMenu.java
@@ -2,13 +2,17 @@ package net.minecraft.core.player.inventory.menu;
 
 import net.minecraft.core.InventoryAction;
 import net.minecraft.core.block.entity.ActivatorBlockEntity;
+import net.minecraft.core.crafting.ContainerListener;
 import net.minecraft.core.entity.player.Player;
+import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.player.inventory.container.Container;
 import net.minecraft.core.player.inventory.slot.Slot;
 
 import java.util.List;
 
 public class ActivatorMenu extends AbstractContainerMenu {
+	public static final int ID_SELECTOR = 0;
+	public static final int ID_LOCKED_SLOTS = 1;
 
 	public ActivatorBlockEntity activator;
 
@@ -16,6 +20,9 @@ public class ActivatorMenu extends AbstractContainerMenu {
 	private final int inventorySlotsStart;
 	private final int hotbarSlotsStart;
 
+	private int selectorSlot;
+	private int lockedSlots;
+
 	public ActivatorMenu(Container container, ActivatorBlockEntity activator) {
 		this.activator = activator;
 		for (int i = 0; i < ActivatorBlockEntity.CONTAINER_SIZE; i++) {
@@ -35,8 +42,44 @@ public class ActivatorMenu extends AbstractContainerMenu {
 		activatorSlotsStart = 0;
 		inventorySlotsStart = 9;
 		hotbarSlotsStart = 36;
+
+		selectorSlot = 0;
+		lockedSlots = 0;
 	}
-	
+
+	@Override
+	public void broadcastChanges() {
+		super.broadcastChanges();
+		for (ContainerListener crafter : containerListeners) {
+			if (selectorSlot != activator.stackSelector) {
+				crafter.updateCraftingInventoryInfo(this, ID_SELECTOR, activator.stackSelector);
+			}
+			if (lockedSlots != activator.lockedSlotBitSet) {
+				crafter.updateCraftingInventoryInfo(this, ID_LOCKED_SLOTS, activator.lockedSlotBitSet);
+			}
+		}
+		this.selectorSlot = activator.stackSelector;
+		this.lockedSlots = activator.lockedSlotBitSet;
+	}
+
+	@Override
+	public void setData(int id, int value) {
+        if (id == ID_SELECTOR) {
+			activator.stackSelector = value;
+        } else if (id == ID_LOCKED_SLOTS) {
+			activator.lockedSlotBitSet = (short) value;
+		}
+	}
+
+	@Override
+	public ItemStack clicked(InventoryAction action, int[] args, Player player) {
+		if (action == InventoryAction.LOCK) {
+			activator.lockSlot(args[0], !activator.locked(args[0]));
+			return null;
+		}
+		return super.clicked(action, args, player);
+	}
+
 	@Override
 	public boolean stillValid(Player entityplayer) {
 		return activator.stillValid(entityplayer);
diff --git a/src/main/java/net/minecraft/core/player/inventory/menu/FurnaceMenu.java b/src/main/java/net/minecraft/core/player/inventory/menu/FurnaceMenu.java
index 22bb60279..2c3a5c73b 100644
--- a/src/main/java/net/minecraft/core/player/inventory/menu/FurnaceMenu.java
+++ b/src/main/java/net/minecraft/core/player/inventory/menu/FurnaceMenu.java
@@ -11,6 +11,10 @@ import net.minecraft.core.player.inventory.slot.Slot;
 import net.minecraft.core.player.inventory.slot.FurnaceSlot;
 
 public class FurnaceMenu extends AbstractContainerMenu {
+	public static final int ID_CURRENT_COOK_TIME = 0;
+	public static final int ID_CURRENT_BURN_TIME = 1;
+	public static final int ID_MAX_COOK_TIME = 2;
+	public static final int ID_MAX_BURN_TIME = 3;
 
 	public FurnaceBlockEntity furnace;
 	private int currentCookTime;
@@ -18,24 +22,24 @@ public class FurnaceMenu extends AbstractContainerMenu {
 	private int itemBurnTime;
 	private int itemCookTime;
 
-	public FurnaceMenu(Inventory inventoryplayer, FurnaceBlockEntity tileentityfurnace) {
+	public FurnaceMenu(Inventory inventory, FurnaceBlockEntity blockEntity) {
 		currentCookTime = 0;
 		currentBurnTime = 0;
 		itemCookTime = 0;
 		itemBurnTime = 0;
-		furnace = tileentityfurnace;
-		addSlot(new Slot(tileentityfurnace, 0, 56, 17));
-		addSlot(new Slot(tileentityfurnace, 1, 56, 53));
-		addSlot(new FurnaceSlot(inventoryplayer.player, tileentityfurnace, 2, 116, 35));
+		furnace = blockEntity;
+		addSlot(new Slot(blockEntity, 0, 56, 17));
+		addSlot(new Slot(blockEntity, 1, 56, 53));
+		addSlot(new FurnaceSlot(inventory.player, blockEntity, 2, 116, 35));
 		for (int i = 0; i < 3; i++) {
 			for (int k = 0; k < 9; k++) {
-				addSlot(new Slot(inventoryplayer, k + i * 9 + 9, 8 + k * 18, 84 + i * 18));
+				addSlot(new Slot(inventory, k + i * 9 + 9, 8 + k * 18, 84 + i * 18));
 			}
 
 		}
 
 		for (int j = 0; j < 9; j++) {
-			addSlot(new Slot(inventoryplayer, j, 8 + j * 18, 142));
+			addSlot(new Slot(inventory, j, 8 + j * 18, 142));
 		}
 
 	}
@@ -45,39 +49,41 @@ public class FurnaceMenu extends AbstractContainerMenu {
 		super.broadcastChanges();
 		for (ContainerListener crafter : containerListeners) {
             if(currentCookTime != furnace.currentCookTime) {
-				crafter.updateCraftingInventoryInfo(this, 0, furnace.currentCookTime);
+				crafter.updateCraftingInventoryInfo(this, ID_CURRENT_COOK_TIME, furnace.currentCookTime);
 			}
 			if(currentBurnTime != furnace.currentBurnTime) {
-				crafter.updateCraftingInventoryInfo(this, 1, furnace.currentBurnTime);
+				crafter.updateCraftingInventoryInfo(this, ID_CURRENT_BURN_TIME, furnace.currentBurnTime);
 			}
 			if(itemCookTime != furnace.maxCookTime) {
-				crafter.updateCraftingInventoryInfo(this, 2, furnace.maxCookTime);
+				crafter.updateCraftingInventoryInfo(this, ID_MAX_COOK_TIME, furnace.maxCookTime);
 			}
 			if(itemBurnTime != furnace.maxBurnTime) {
-				crafter.updateCraftingInventoryInfo(this, 3, furnace.maxBurnTime);
+				crafter.updateCraftingInventoryInfo(this, ID_MAX_BURN_TIME, furnace.maxBurnTime);
 			}
 		}
 
 		this.currentCookTime = furnace.currentCookTime;
 		this.currentBurnTime = furnace.currentBurnTime;
-		itemCookTime = furnace.maxCookTime;
-		itemBurnTime = furnace.maxBurnTime;
+		this.itemCookTime = furnace.maxCookTime;
+		this.itemBurnTime = furnace.maxBurnTime;
 	}
 
 	@Override
 	public void setData(int id, int value) {
-		if(id == 0) {
-			furnace.currentCookTime = value;
-		}
-		if(id == 1) {
-			furnace.currentBurnTime = value;
-		}
-		if(id == 2) {
-			furnace.maxCookTime = value;
-		}
-		if(id == 3) {
-			furnace.maxBurnTime = value;
-		}
+        switch (id) {
+            case ID_CURRENT_COOK_TIME:
+                furnace.currentCookTime = value;
+                break;
+            case ID_CURRENT_BURN_TIME:
+                furnace.currentBurnTime = value;
+                break;
+            case ID_MAX_COOK_TIME:
+                furnace.maxCookTime = value;
+                break;
+            case ID_MAX_BURN_TIME:
+                furnace.maxBurnTime = value;
+                break;
+        }
 	}
 
 	@Override
diff --git a/src/main/java/net/minecraft/core/player/inventory/slot/ArmorSlot.java b/src/main/java/net/minecraft/core/player/inventory/slot/ArmorSlot.java
index 20b34fd84..727379d12 100644
--- a/src/main/java/net/minecraft/core/player/inventory/slot/ArmorSlot.java
+++ b/src/main/java/net/minecraft/core/player/inventory/slot/ArmorSlot.java
@@ -47,14 +47,7 @@ public class ArmorSlot extends Slot
         {
             return ((IArmorItem)itemstack.getItem()).getArmorPiece() == armorType;
         }
-        if(itemstack.getItem() instanceof BlockItem)
-        {
-            return armorType == IArmorItem.PIECE_HEAD;
-        }
-        else
-        {
-            return false;
-        }
+        return armorType == IArmorItem.PIECE_HEAD;
     }
     
     @Override
diff --git a/src/main/java/net/minecraft/core/world/saveddata/maps/ItemMapSavedData.java b/src/main/java/net/minecraft/core/world/saveddata/maps/ItemMapSavedData.java
index 53dedd4d6..5d8ba3343 100644
--- a/src/main/java/net/minecraft/core/world/saveddata/maps/ItemMapSavedData.java
+++ b/src/main/java/net/minecraft/core/world/saveddata/maps/ItemMapSavedData.java
@@ -24,7 +24,7 @@ public class ItemMapSavedData extends SavedData
     public byte dimension;
     public byte scale;
     public byte[] colors;
-    public int step;
+    public int tick;
     public List<HoldingPlayer> carriedBy;
     private final Map<Player, HoldingPlayer> carriedByPlayers;
     public List<MapDecoration> decorations;
@@ -142,17 +142,15 @@ public class ItemMapSavedData extends SavedData
             byte color = 0;
             byte xCoord = (byte)(MathHelper.clamp((double)(f * 2.0F) + 0.5D, -128, 127));
             byte zCoord = (byte)(MathHelper.clamp((double)(f1 * 2.0F) + 0.5D, -128, 127));
-            float yRot = player.yRot;
-            while (yRot < 0) yRot += 360;
-            byte rotation = (byte)((double)((yRot * 16F) / 360F) + 0.5D);
+            byte rotation = (byte)Math.round(((player.yRot % 360) * MapDecoration.ROTATION_STEPS) / 360F);
             if(dimension == 1)
             {
-                int l = step / 10;
-                rotation = (byte)(l * l * 0x209a771 + l * 121 >> 15 & 0xf);
+                int l = tick / 10;
+                rotation = (byte)(l * l * 0x209a771 + l * 121 >> 15 & 0xf); // Randomize rotation
             }
             if(mapinfo1.player.dimension == dimension)
             {
-                decorations.add(new MapDecoration(color, xCoord, zCoord, rotation));
+                decorations.add(new MapDecoration(color, xCoord, zCoord, (byte) (rotation % MapDecoration.ROTATION_STEPS)));
             }
 
 
@@ -345,6 +343,7 @@ public class ItemMapSavedData extends SavedData
 
     public static class MapDecoration
     {
+        public static final int ROTATION_STEPS = 16;
         public byte type;
         public byte x;
         public byte y;
@@ -352,6 +351,7 @@ public class ItemMapSavedData extends SavedData
 
         public MapDecoration(byte type, byte x, byte y, byte rot)
         {
+            assert rot >= -ROTATION_STEPS && rot <= ROTATION_STEPS : "Map decoration rotation byte outside of range [-16, 16]";
             this.type = type;
             this.x = x;
             this.y = y;
diff --git a/src/main/java/net/minecraft/server/net/PlayerList.java b/src/main/java/net/minecraft/server/net/PlayerList.java
index a68b18056..2ca164366 100644
--- a/src/main/java/net/minecraft/server/net/PlayerList.java
+++ b/src/main/java/net/minecraft/server/net/PlayerList.java
@@ -650,8 +650,9 @@ public class PlayerList
 
     }
 
-    public void sendBlockEntityToPlayer(int x, int y, int z, BlockEntity blockEntity)
+    public void sendBlockEntityToPlayer(int x, int y, int z, int dimension, BlockEntity blockEntity)
     {
+        getPlayerManager(dimension).markBlockNeedsUpdate(x, y, z);
     }
 
     public synchronized void addToWhiteList(UUID uuid)
diff --git a/src/main/java/net/minecraft/server/player/PlayerManager.java b/src/main/java/net/minecraft/server/player/PlayerManager.java
index e69a24bef..773ef4407 100644
--- a/src/main/java/net/minecraft/server/player/PlayerManager.java
+++ b/src/main/java/net/minecraft/server/player/PlayerManager.java
@@ -349,7 +349,7 @@ public class PlayerManager
             numBlocksToUpdate = 0;
         }
 
-        private void updateTileEntity(BlockEntity tileentity) {
+        public void updateTileEntity(BlockEntity tileentity) {
             if (tileentity != null) {
                 Packet packet = tileentity.getDescriptionPacket();
                 if (packet != null) {
diff --git a/src/main/java/net/minecraft/server/world/WorldManager.java b/src/main/java/net/minecraft/server/world/WorldManager.java
index 5cf17d11a..cc4d33e62 100644
--- a/src/main/java/net/minecraft/server/world/WorldManager.java
+++ b/src/main/java/net/minecraft/server/world/WorldManager.java
@@ -113,7 +113,7 @@ public class WorldManager
     @Override
 	public void tileEntityChanged(int x, int y, int z, BlockEntity blockEntity)
     {
-        mcServer.playerList.sendBlockEntityToPlayer(x, y, z, blockEntity);
+        mcServer.playerList.sendBlockEntityToPlayer(x, y, z, worldServer.dimension.id, blockEntity);
     }
 
     @Override
diff --git a/src/main/java/org/useless/stellar/StarUtil.java b/src/main/java/org/useless/stellar/StarUtil.java
new file mode 100644
index 000000000..0bc779eea
--- /dev/null
+++ b/src/main/java/org/useless/stellar/StarUtil.java
@@ -0,0 +1,126 @@
+package org.useless.stellar;
+
+import net.minecraft.core.util.helper.Color;
+import net.minecraft.core.util.helper.MathHelper;
+import org.lwjgl.opengl.GL;
+
+import static org.lwjgl.glfw.GLFW.glfwCreateWindow;
+import static org.lwjgl.glfw.GLFW.glfwInit;
+import static org.lwjgl.glfw.GLFW.glfwMakeContextCurrent;
+import static org.lwjgl.glfw.GLFW.glfwPollEvents;
+import static org.lwjgl.glfw.GLFW.glfwSwapBuffers;
+import static org.lwjgl.glfw.GLFW.glfwWindowShouldClose;
+import static org.lwjgl.opengl.GL11.GL_COLOR_BUFFER_BIT;
+import static org.lwjgl.opengl.GL11.GL_QUADS;
+import static org.lwjgl.opengl.GL11.glBegin;
+import static org.lwjgl.opengl.GL11.glClear;
+import static org.lwjgl.opengl.GL11.glClearColor;
+import static org.lwjgl.opengl.GL11.glColor4d;
+import static org.lwjgl.opengl.GL11.glEnd;
+import static org.lwjgl.opengl.GL11.glLoadIdentity;
+import static org.lwjgl.opengl.GL11.glOrtho;
+import static org.lwjgl.opengl.GL11.glVertex2d;
+
+
+/**
+ * Based off the answer posted to stackoverflow here: https://stackoverflow.com/questions/21977786/star-b-v-color-index-to-apparent-rgb-color
+ */
+public class StarUtil {
+    private static double[] redco = new double[]{
+        1.62098281e-82, -5.03110845e-77, 6.66758278e-72,
+        -4.71441850e-67, 1.66429493e-62, -1.50701672e-59,
+        -2.42533006e-53, 8.42586475e-49, 7.94816523e-45,
+        -1.68655179e-39, 7.25404556e-35, -1.85559350e-30,
+        3.23793430e-26, -4.00670131e-22, 3.53445102e-18,
+        -2.19200432e-14, 9.27939743e-11, -2.56131914e-07,
+        4.29917840e-04, -3.88866019e-01, 3.97307766e+02};
+    private static double[] greenco = new double[]{
+        1.21775217e-82, -3.79265302e-77, 5.04300808e-72,
+        -3.57741292e-67, 1.26763387e-62, -1.28724846e-59,
+        -1.84618419e-53, 6.43113038e-49, 6.05135293e-45,
+        -1.28642374e-39, 5.52273817e-35, -1.40682723e-30,
+        2.43659251e-26, -2.97762151e-22, 2.57295370e-18,
+        -1.54137817e-14, 6.14141996e-11, -1.50922703e-07,
+        1.90667190e-04, -1.23973583e-02,-1.33464366e+01};
+    private static double[] blueco = new double[]{
+        2.17374683e-82, -6.82574350e-77, 9.17262316e-72,
+        -6.60390151e-67, 2.40324203e-62, -5.77694976e-59,
+        -3.42234361e-53, 1.26662864e-48, 8.75794575e-45,
+        -2.45089758e-39, 1.10698770e-34, -2.95752654e-30,
+        5.41656027e-26, -7.10396545e-22, 6.74083578e-18,
+        -4.59335728e-14, 2.20051751e-10, -7.14068799e-07,
+        1.46622559e-03, -1.60740964e+00, 6.85200095e+02};
+
+    public static double poly1d(double[] doubles, double x) {
+        int power = doubles.length - 1;
+        double count = 0;
+        for (int i = 0; i < doubles.length; i++) {
+            count += doubles[i] * Math.pow(x, power--);
+        }
+        return count;
+    }
+
+    public static int getStarColorFromTemp(int temperature) {
+        double red = poly1d(redco, temperature);
+        double green = poly1d(greenco, temperature);
+        double blue = poly1d(blueco, temperature);
+
+        if (red > 255) {
+            red = 255;
+        } else if (red < 0) {
+            red = 0;
+        }
+
+        if (green > 255) {
+            green = 255;
+        } else if (green < 0) {
+            green = 0;
+        }
+
+        if (blue > 255) {
+            blue = 255;
+        } else if (blue < 0) {
+            blue = 0;
+        }
+
+        return Color.intToIntARGB( 255, MathHelper.floor(red), MathHelper.floor(green), MathHelper.floor(blue));
+    }
+
+    public static void main(String[] args) throws Exception {
+        glfwInit();
+
+        long windowHandle = glfwCreateWindow(1800, 256, "Gradient", 0, 0);
+
+        glfwMakeContextCurrent(windowHandle);
+        GL.createCapabilities();
+
+        while(!glfwWindowShouldClose(windowHandle)) {
+            glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+            glClear(GL_COLOR_BUFFER_BIT);
+            glLoadIdentity();
+            glOrtho(0, 1, 0, 1, -1, 1);
+
+            glBegin(GL_QUADS);
+
+            final int startOffset = 1000;
+            final int tempRange = 17500;
+            final int bandWidth = 4;
+            final int iterations = tempRange/bandWidth;
+            for (int i = 0; i < iterations; i += bandWidth) {
+                int color = getStarColorFromTemp(i * bandWidth + startOffset);
+                glColor4d(Color.redFromInt(color)/255d, Color.greenFromInt(color)/255d, Color.blueFromInt(color)/255d, 1d);
+                double left = (double) i /iterations;
+                double offset = (double) bandWidth /iterations;
+                glVertex2d(left, 0);
+                glVertex2d(left, 1);
+                glVertex2d(left + offset, 1);
+                glVertex2d(left + offset, 0);
+            }
+
+            glEnd();
+
+            glfwPollEvents();
+            glfwSwapBuffers(windowHandle);
+        }
+    }
+}
diff --git a/src/main/resources/assets/minecraft/textures/colormap/stars/default.png b/src/main/resources/assets/minecraft/textures/colormap/stars/default.png
new file mode 100644
index 000000000..1cc7e9000
Binary files /dev/null and b/src/main/resources/assets/minecraft/textures/colormap/stars/default.png differ
