diff --git a/game/client/src/main/java/net/minecraft/client/Minecraft.java b/game/client/src/main/java/net/minecraft/client/Minecraft.java index d19a667a5..26ab5ec5b 100644 --- a/game/client/src/main/java/net/minecraft/client/Minecraft.java +++ b/game/client/src/main/java/net/minecraft/client/Minecraft.java @@ -1991,7 +1991,6 @@ public class Minecraft ); world.getLevelData().setCheatsEnabled(worldConfiguration.getCheatsEnabled()); world.getLevelData().getGameRules().setValues(worldConfiguration.getGameRules()); - world.getSpawnerConfig().set(worldConfiguration.getSpawnerConfig()); this.statsCounter.add(StatList.createWorldStat, 1); this.statsCounter.add(StatList.startGameStat, 1); diff --git a/game/client/src/main/java/net/minecraft/client/gui/DrawableSurfaceElement.java b/game/client/src/main/java/net/minecraft/client/gui/DrawableSurfaceElement.java index ae3754886..ff2a02312 100644 --- a/game/client/src/main/java/net/minecraft/client/gui/DrawableSurfaceElement.java +++ b/game/client/src/main/java/net/minecraft/client/gui/DrawableSurfaceElement.java @@ -1,6 +1,8 @@ package net.minecraft.client.gui; import net.minecraft.client.gui.drawing.IDrawableSurface; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class DrawableSurfaceElement extends Gui @@ -11,6 +13,7 @@ public class DrawableSurfaceElement private final int canvasScale; private final byte[] surfaceData; public int[] colors = new int[0]; + private final @Nullable UpdateListener onPixelChanged; public DrawableSurfaceElement(int width, int height, int scale) { @@ -18,11 +21,17 @@ public class DrawableSurfaceElement } public DrawableSurfaceElement(int width, int height, int scale, byte[] surfaceData) + { + this(width, height, scale, surfaceData, null); + } + + public DrawableSurfaceElement(int width, int height, int scale, byte[] surfaceData, @Nullable UpdateListener onPixelChanged) { this.canvasWidth = width; this.canvasHeight = height; this.canvasScale = scale; this.surfaceData = surfaceData; + this.onPixelChanged = onPixelChanged; } public void render(int x, int y) @@ -87,6 +96,11 @@ public class DrawableSurfaceElement if (y < 0 || y >= canvasHeight) return false; surfaceData[x + canvasWidth * y] = value; + if (onPixelChanged != null) onPixelChanged.onPixelChanged(x, y, value); return true; } + + public interface UpdateListener { + void onPixelChanged(int x, int y, byte value); + } } diff --git a/game/client/src/main/java/net/minecraft/client/gui/ItemElement.java b/game/client/src/main/java/net/minecraft/client/gui/ItemElement.java index 627376011..297a8dab0 100644 --- a/game/client/src/main/java/net/minecraft/client/gui/ItemElement.java +++ b/game/client/src/main/java/net/minecraft/client/gui/ItemElement.java @@ -58,7 +58,9 @@ public class ItemElement extends Gui { GLRenderer.enableState(State.DEPTH_TEST); if (itemStack != null) { final ItemModel itemModel = ItemModelDispatcher.getInstance().getDispatch(itemStack.getItem()); - itemModel.renderGui(GLRenderer.getTessellator(), null, itemStack, x, y, discovered ? LightIndexHelper.lightIndex2i(15, 15) : LightIndexHelper.lightIndex2i(0, 0), 1f); + if (!discovered) GLRenderer.setColor1i(0xFF000000); + itemModel.renderGui(GLRenderer.getTessellator(), null, itemStack, x, y, LightIndexHelper.lightIndex2i(15, 15), 1f); + if (!discovered) GLRenderer.setColor1i(0xFFFFFFFF); if (slot instanceof SlotGuidebook slotGuidebook) { if (slotGuidebook.recipe instanceof RecipeEntryTrommel recipeEntryTrommel && slotGuidebook.item != null && slotGuidebook.isOutput) { final WeightedRandomBag loot = recipeEntryTrommel.getOutput(); diff --git a/game/client/src/main/java/net/minecraft/client/gui/ScreenSelectWorld.java b/game/client/src/main/java/net/minecraft/client/gui/ScreenSelectWorld.java index 6bd32029e..aa7f5f622 100644 --- a/game/client/src/main/java/net/minecraft/client/gui/ScreenSelectWorld.java +++ b/game/client/src/main/java/net/minecraft/client/gui/ScreenSelectWorld.java @@ -4,9 +4,11 @@ import com.mojang.nbt.tags.CompoundTag; import com.mojang.nbt.tags.IntTag; import com.mojang.nbt.tags.StringTag; import com.mojang.nbt.tags.Tag; +import net.minecraft.client.gui.modelviewer.elements.ListenerButtonElement; import net.minecraft.client.gui.popup.PopupScreen; import net.minecraft.client.gui.popup.PopupBuilder; import net.minecraft.client.render.tessellator.TessellatorGeneral; +import net.minecraft.client.util.helper.FileOpener; import net.minecraft.core.Global; import net.minecraft.core.data.registry.Registries; import net.minecraft.core.net.command.TextFormatting; @@ -25,6 +27,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.lwjgl.input.Keyboard; +import java.io.File; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Collections; @@ -47,6 +50,7 @@ public class ScreenSelectWorld extends Screen { private ButtonElement buttonRename; private ButtonElement buttonSelect; private ButtonElement buttonDelete; + private ButtonElement buttonFolder; public ScreenSelectWorld(Screen parent) { super(parent); @@ -122,13 +126,21 @@ public class ScreenSelectWorld extends Screen { public void initButtons() { I18n i18n = I18n.getInstance(); this.buttons.add(this.buttonSelect = new ButtonElement(1, this.width / 2 - 154, this.height - 52, 150, 20, i18n.translateKey("gui.select_world.button.play_selected_world"))); - this.buttons.add(this.buttonRename = new ButtonElement(6, this.width / 2 - 154, this.height - 28, 70, 20, i18n.translateKey("gui.select_world.button.rename"))); - this.buttons.add(this.buttonDelete = new ButtonElement(2, this.width / 2 - 74, this.height - 28, 70, 20, i18n.translateKey("gui.select_world.button.delete"))); + this.buttons.add(this.buttonFolder = new ListenerButtonElement(8, this.width / 2 - 154, this.height - 28, 20, 20, "") + .setTextures("minecraft:gui/misc/button_folder", "minecraft:gui/misc/button_folder_highlighted", "minecraft:gui/misc/button_folder_disabled") + .setListener(buttonElement -> { + if (selectedWorld < 0) return; + SaveFile save = this.saveList.get(this.selectedWorld); + FileOpener.open(new File(mc.getMinecraftDir(), "saves/" + save.getFileName())); + })); + this.buttons.add(this.buttonRename = new ButtonElement(6, this.width / 2 - 126, this.height - 28, 57, 20, i18n.translateKey("gui.select_world.button.rename"))); + this.buttons.add(this.buttonDelete = new ButtonElement(2, this.width / 2 - 61, this.height - 28, 57, 20, i18n.translateKey("gui.select_world.button.delete"))); this.buttons.add(new ButtonElement(3, this.width / 2 + 4, this.height - 52, 150, 20, i18n.translateKey("gui.select_world.button.create_new_world"))); this.buttons.add(new ButtonElement(0, this.width / 2 + 4, this.height - 28, 150, 20, i18n.translateKey("gui.select_world.button.cancel"))); this.buttonSelect.enabled = false; this.buttonRename.enabled = false; this.buttonDelete.enabled = false; + this.buttonFolder.enabled = false; } public void deletePresetWorld(String name) { @@ -268,6 +280,7 @@ public class ScreenSelectWorld extends Screen { ScreenSelectWorld.this.buttonSelect.enabled = flag1 && !corrupted; ScreenSelectWorld.this.buttonRename.enabled = flag1 && !corrupted; ScreenSelectWorld.this.buttonDelete.enabled = flag1; + ScreenSelectWorld.this.buttonFolder.enabled = flag1; if (doubleClicked && flag1) { selectWorld(itemIndex); } diff --git a/game/client/src/main/java/net/minecraft/client/gui/container/ScreenFlagEditor.java b/game/client/src/main/java/net/minecraft/client/gui/container/ScreenFlagEditor.java index 3712b8a1a..9bef9bdc4 100644 --- a/game/client/src/main/java/net/minecraft/client/gui/container/ScreenFlagEditor.java +++ b/game/client/src/main/java/net/minecraft/client/gui/container/ScreenFlagEditor.java @@ -64,7 +64,7 @@ public class ScreenFlagEditor this.ySize = 195; flagTileEntity.owner = player.uuid; - this.flagSurface = new DrawableSurfaceElement(this.CANVAS_WIDTH, this.CANVAS_HEIGHT, this.CANVAS_SCALE, flagTileEntity.flagColors); + this.flagSurface = new DrawableSurfaceElement(this.CANVAS_WIDTH, this.CANVAS_HEIGHT, this.CANVAS_SCALE, flagTileEntity.flagColors, (x, y, value) -> flagTileEntity.colorsChanged()); this.flagSurfaceEditor = new DrawableEditor<>(this.flagSurface); this.drawOverlaySurface = new DrawableSurfaceElement(this.CANVAS_WIDTH, this.CANVAS_HEIGHT, this.CANVAS_SCALE); this.drawOverlaySurfaceEditor = new DrawableEditor<>(this.drawOverlaySurface); @@ -423,7 +423,7 @@ public class ScreenFlagEditor if (y < 0 || y >= this.CANVAS_HEIGHT) return false; this.flagEntity.flagColors[x + 24 * y] = value; - this.flagEntity.isDirty = true; + this.flagEntity.colorsChanged(); return true; } diff --git a/game/client/src/main/java/net/minecraft/client/gui/options/data/OptionsPages.java b/game/client/src/main/java/net/minecraft/client/gui/options/data/OptionsPages.java index 5d5ba8232..4e3382389 100644 --- a/game/client/src/main/java/net/minecraft/client/gui/options/data/OptionsPages.java +++ b/game/client/src/main/java/net/minecraft/client/gui/options/data/OptionsPages.java @@ -137,6 +137,10 @@ public abstract class OptionsPages { .withComponent(new FloatOptionComponent(GameSettings.CAVE_SOUNDS_VOLUME)) .withComponent(new FloatOptionComponent(GameSettings.GUI_SOUNDS_VOLUME)) ) + .withComponent(new ShortcutComponent("gui.options.page.audio.reload", () -> { + Minecraft.getMinecraft().sndManager.destroy(); + Minecraft.getMinecraft().sndManager.init(); + })) ); VIDEO = register(new OptionsPage("gui.options.page.video.title", new ItemStack(Items.FLAG)) diff --git a/game/client/src/main/java/net/minecraft/client/gui/worldsettings/EntryMobSpawningComponent.java b/game/client/src/main/java/net/minecraft/client/gui/worldsettings/EntryMobSpawningComponent.java index 895310b6a..d2714fa9b 100644 --- a/game/client/src/main/java/net/minecraft/client/gui/worldsettings/EntryMobSpawningComponent.java +++ b/game/client/src/main/java/net/minecraft/client/gui/worldsettings/EntryMobSpawningComponent.java @@ -47,7 +47,8 @@ public class EntryMobSpawningComponent extends ButtonComponent{ @Override protected void buttonClicked(int mouseButton, int x, int y, int width, int height, int relativeMouseX, int relativeMouseY) { - this.worldConfiguration.getSpawnerConfig().setMobSpawn(this.entry.namespaceID, this.worldConfiguration.getSpawnerConfig().canMobSpawn(this.entry.namespaceID)); + this.button.setOn(!this.button.isOn()); + this.worldConfiguration.getSpawnerConfig().setMobSpawn(this.entry.namespaceID, this.button.isOn()); onChange(); } diff --git a/game/client/src/main/java/net/minecraft/client/option/GameSettings.java b/game/client/src/main/java/net/minecraft/client/option/GameSettings.java index 42f2861ee..f10ea0fbc 100644 --- a/game/client/src/main/java/net/minecraft/client/option/GameSettings.java +++ b/game/client/src/main/java/net/minecraft/client/option/GameSettings.java @@ -332,7 +332,7 @@ public final class GameSettings { return option.toOptionsString(); })); public static final @NotNull OptionEnum RENDER_SCALE = register(new OptionEnum<>("renderScale", RenderScale.class, RenderScale.SCALE_100)); - public static final @NotNull OptionFloat HEAT_HAZE = register(new OptionFloat("heatHaze", 50)); + public static final @NotNull OptionFloat HEAT_HAZE = register(new OptionFloat("heatHaze", 0.5f)); public static final @NotNull OptionBoolean ALPHA_MENU = register(new OptionBoolean("old", false)); public static final @NotNull OptionBoolean ENABLE_ITEM_CLUMPING = register(new OptionBoolean("enableItemClumping", true)); public static final @NotNull OptionEnum ITEM_DESCRIPTIONS = register(new OptionEnum<>("itemDescriptions", DescriptionPromptEnum.class, DescriptionPromptEnum.PROMPT)); diff --git a/game/client/src/main/java/net/minecraft/client/render/block/model/generic/BlockModelGenericLayer.java b/game/client/src/main/java/net/minecraft/client/render/block/model/generic/BlockModelGenericLayer.java index 92c4b7d8b..ad9efb476 100644 --- a/game/client/src/main/java/net/minecraft/client/render/block/model/generic/BlockModelGenericLayer.java +++ b/game/client/src/main/java/net/minecraft/client/render/block/model/generic/BlockModelGenericLayer.java @@ -31,13 +31,17 @@ public class BlockModelGenericLayer extends BlockModelGene @Override public boolean cullSide(@NotNull WorldSource worldSource, @NotNull TilePosc blockPos, @Nullable Direction direction) { if (direction != null) { - TilePos shifted = blockPos.add(direction, this.queryPos); - if (worldSource.getBlockType(shifted) == this.block) { - int dataOther = worldSource.getBlockData(shifted); - int dataSelf = worldSource.getBlockData(blockPos); - return dataSelf <= dataOther || worldSource.isBlockOpaqueCube(shifted); - } else { - return worldSource.isBlockOpaqueCube(shifted); + if (direction.isHorizontal()) { + TilePos shifted = blockPos.add(direction, this.queryPos); + if (worldSource.getBlockType(shifted) == this.block) { + int dataOther = worldSource.getBlockData(shifted); + int dataSelf = worldSource.getBlockData(blockPos); + return dataSelf <= dataOther || worldSource.isBlockOpaqueCube(shifted); + } else { + return worldSource.isBlockOpaqueCube(shifted); + } + } else if (direction == Direction.DOWN) { + return super.cullSide(worldSource, blockPos, direction); } } return false; diff --git a/game/client/src/main/java/net/minecraft/client/render/entity/MobRendererBipedArmored.java b/game/client/src/main/java/net/minecraft/client/render/entity/MobRendererBipedArmored.java index 82a73993a..603b04801 100644 --- a/game/client/src/main/java/net/minecraft/client/render/entity/MobRendererBipedArmored.java +++ b/game/client/src/main/java/net/minecraft/client/render/entity/MobRendererBipedArmored.java @@ -26,7 +26,7 @@ public abstract class MobRendererBipedArmored { final StaticEntityModel model = getModel("main"); model.resetBones(); + final float bodyYaw = getBodyYaw(entity, partialTick); + final float headYaw = getHeadYaw(entity, partialTick) - bodyYaw; + final float headPitch = getHeadPitch(entity, partialTick); final float limbSwing = getLimbSwing(entity, partialTick); final float limbYaw = getLimbYaw(entity, partialTick); final float limbPitch = getLimbPitch(entity, partialTick); + final BoneTransform head = model.getTransform("head"); final BoneTransform leg0 = model.getTransform("leg0"); final BoneTransform leg1 = model.getTransform("leg1"); final BoneTransform wing0 = model.getTransform("wing0"); final BoneTransform wing1 = model.getTransform("wing1"); + head.rotX = headPitch; + head.rotY = headYaw; leg0.rotX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbYaw; leg1.rotX = MathHelper.cos(limbSwing * 0.6662F + MathHelper.PI) * 1.4F * limbYaw; wing0.rotZ = limbPitch; diff --git a/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelBlock.java b/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelBlock.java index ef0b3afca..b30efc77d 100644 --- a/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelBlock.java +++ b/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelBlock.java @@ -24,7 +24,7 @@ public class ItemModelBlock extends ItemModelStandard { private final Block block; private final BlockModel blockModel; public ItemModelBlock(ItemBlock itemBlock){ - super(itemBlock, null); + super(itemBlock, false); this.block = itemBlock.getBlock(); this.blockModel = BlockModelDispatcher.getInstance().getDispatch(this.block); this.icon = this.blockModel.getOverlayTexture(0); diff --git a/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelDoorPainted.java b/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelDoorPainted.java index 724eed3cc..1f24c165e 100644 --- a/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelDoorPainted.java +++ b/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelDoorPainted.java @@ -16,7 +16,7 @@ public class ItemModelDoorPainted extends ItemModelStandard { } } public ItemModelDoorPainted(Item item) { - super(item, null); + super(item, false); } public @NotNull IconCoordinate getIcon(Entity entity, @NotNull ItemStack itemStack){ int meta = itemStack.getMetadata(); diff --git a/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelDye.java b/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelDye.java index d1e0a4854..2cd164b05 100644 --- a/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelDye.java +++ b/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelDye.java @@ -17,7 +17,7 @@ public class ItemModelDye extends ItemModelStandard { } } public ItemModelDye(Item item) { - super(item, null); + super(item, false); } public @NotNull IconCoordinate getIcon(@Nullable Entity entity, @NotNull ItemStack itemStack){ diff --git a/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelSignPainted.java b/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelSignPainted.java index f8556aa1c..cb9eb78ae 100644 --- a/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelSignPainted.java +++ b/game/client/src/main/java/net/minecraft/client/render/item/model/ItemModelSignPainted.java @@ -16,7 +16,7 @@ public class ItemModelSignPainted extends ItemModelStandard { } } public ItemModelSignPainted(Item item) { - super(item, null); + super(item, false); } public @NotNull IconCoordinate getIcon(Entity entity, @NotNull ItemStack itemStack){ int meta = itemStack.getMetadata(); diff --git a/game/client/src/main/java/net/minecraft/client/render/particle/ParticleDispatcher.java b/game/client/src/main/java/net/minecraft/client/render/particle/ParticleDispatcher.java index f30ce7554..1eda33cc3 100644 --- a/game/client/src/main/java/net/minecraft/client/render/particle/ParticleDispatcher.java +++ b/game/client/src/main/java/net/minecraft/client/render/particle/ParticleDispatcher.java @@ -234,6 +234,12 @@ public final class ParticleDispatcher extends Dispatcher return new ParticleFluidDrip(world, x, y, z, 0xFFFFFF, TextureRegistry.getTexture("minecraft:block/fluid/lava/flowing")).setFullBright(); } }); + addDispatch("dripAcid", new ParticleEntry() { + @Override + public Particle newParticle(@NotNull World world, double x, double y, double z, double motionX, double motionY, double motionZ, int data) { + return new ParticleFluidDrip(world, x, y, z, 0xFFFFFF, TextureRegistry.getTexture("minecraft:block/fluid/acid/flowing")).setFullBright(); + } + }); addDispatch("ashmote", new ParticleEntry() { @Override public Particle newParticle(@NotNull World world, double x, double y, double z, double motionX, double motionY, double motionZ, int data) { diff --git a/game/client/src/main/java/net/minecraft/client/render/tessellator/TessellatorFont.java b/game/client/src/main/java/net/minecraft/client/render/tessellator/TessellatorFont.java index 226579478..19dedaf98 100644 --- a/game/client/src/main/java/net/minecraft/client/render/tessellator/TessellatorFont.java +++ b/game/client/src/main/java/net/minecraft/client/render/tessellator/TessellatorFont.java @@ -129,7 +129,7 @@ public class TessellatorFont { GL41.glBindVertexArray(this.vao); GL41.glBindBuffer(GL41.GL_ARRAY_BUFFER, this.vbo); - GL41.glVertexAttrib1f(5, GLRenderer.getLightIndex()); + GL41.glVertexAttrib1f(6, GLRenderer.getLightIndex()); GL41.glBufferData(GL41.GL_ARRAY_BUFFER, this.data.flip(), GL41.GL_STREAM_DRAW); for (int i = 0, size = this.renderRanges.size(); i < size; i += 3) { diff --git a/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererFlowerJar.java b/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererFlowerJar.java index ca69da086..0551cd7aa 100644 --- a/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererFlowerJar.java +++ b/game/client/src/main/java/net/minecraft/client/render/tileentity/TileEntityRendererFlowerJar.java @@ -25,9 +25,7 @@ public class TileEntityRendererFlowerJar extends TileEntityRenderer armorWearer, final int layer, final TileEntityStatue.@NotNull Pose pose) { - final ItemStack itemstack = armorWearer.getItemInArmorSlot(HumanArmorShape.values()[(armorWearer.getNumArmorSlots() - 1) - layer]); + final ItemStack itemstack = armorWearer.getItemInArmorSlot(HumanArmorShape.values()[layer]); if (itemstack != null) { final Item item = itemstack.getItem(); if (item instanceof ItemQuiver) { diff --git a/game/client/src/main/resources/assets/minecraft/models/block/trapdoor/bottom.json b/game/client/src/main/resources/assets/minecraft/models/block/trapdoor/bottom.json index c5219626a..714919313 100644 --- a/game/client/src/main/resources/assets/minecraft/models/block/trapdoor/bottom.json +++ b/game/client/src/main/resources/assets/minecraft/models/block/trapdoor/bottom.json @@ -3,9 +3,7 @@ "credit": "Made with Blockbench", "parent": "block/block_thin", "textures": { - "particle": "block/trapdoor/steel/top", - "texture": "block/trapdoor/steel/top", - "side": "block/trapdoor/steel/side" + "particle": "#texture" }, "elements": [ { diff --git a/game/client/src/main/resources/assets/minecraft/models/block/trapdoor/steel/bottom.json b/game/client/src/main/resources/assets/minecraft/models/block/trapdoor/steel/bottom.json index db24c33c2..169e7b7a3 100644 --- a/game/client/src/main/resources/assets/minecraft/models/block/trapdoor/steel/bottom.json +++ b/game/client/src/main/resources/assets/minecraft/models/block/trapdoor/steel/bottom.json @@ -2,6 +2,6 @@ "parent": "minecraft:block/trapdoor/bottom", "textures": { "texture": "minecraft:block/trapdoor/steel/top", - "side": "minecraft:block/trapdoor/steel/top" + "side": "minecraft:block/trapdoor/steel/side" } } \ No newline at end of file diff --git a/game/client/src/main/resources/assets/minecraft/textures/gui/sprites/misc/button_folder_disabled.png b/game/client/src/main/resources/assets/minecraft/textures/gui/sprites/misc/button_folder_disabled.png new file mode 100644 index 000000000..1d1ac6099 Binary files /dev/null and b/game/client/src/main/resources/assets/minecraft/textures/gui/sprites/misc/button_folder_disabled.png differ diff --git a/game/core/build.gradle.kts b/game/core/build.gradle.kts index ccc59f52f..2933056c4 100644 --- a/game/core/build.gradle.kts +++ b/game/core/build.gradle.kts @@ -110,12 +110,8 @@ fun genProtocol(version: String, channel: String): String { val parts2 = parts[1].split("_") minor = parts2[0].trim().toInt() patch = parts2[1].trim().toInt() - } else if (parts[1].contains("prerelease", true)) { - val parts2 = parts[1].lowercase().split("prerelease") - minor = parts2[0].trim().toInt() - patch = parts2[1].trim().toInt() - } else if (parts[1].contains("pre", true)) { - val parts2 = parts[1].lowercase().split("pre") + } else if (parts[1].contains("-pre", true)) { + val parts2 = parts[1].lowercase().split("-pre") minor = parts2[0].trim().toInt() patch = parts2[1].trim().toInt() } else { diff --git a/game/core/src/main/java/net/minecraft/core/block/FluidAcid.java b/game/core/src/main/java/net/minecraft/core/block/FluidAcid.java index dc9189408..fea0f28f9 100644 --- a/game/core/src/main/java/net/minecraft/core/block/FluidAcid.java +++ b/game/core/src/main/java/net/minecraft/core/block/FluidAcid.java @@ -41,11 +41,12 @@ public class FluidAcid implements Fluid { world.spawnParticle("acidBoiling", (double) tilePos.x() + Math.random(), (float) tilePos.y() + 0.05F, (double) tilePos.z() + Math.random(), 0.0F, 0.0F, 0.0F, 0, false); } - if (rand.nextInt(4) == 0 && world.getBlockType(tilePos.down(new TilePos())).solid() && !world.getBlockType(tilePos.down(new TilePos()).down()).solid()) { + Block below; + if (rand.nextInt(4) == 0 && world.getBlockType(tilePos.down(new TilePos())).solid() && !(below = world.getBlockType(tilePos.down(new TilePos()).down())).solid() && !Block.hasLogicClass(below, BlockLogicFluid.class)) { float off1 = rand.nextFloat() * 0.9F + 0.05F; float off2 = rand.nextFloat() * 0.9F + 0.05F; float lOff = 0.01F; - world.spawnParticle("acidDrip", (float) tilePos.x() + off1, (float) (tilePos.y() - 1) - lOff, (float) tilePos.z() + off2, 0.0F, 0.0F, 0.0F, 0, false); + world.spawnParticle("dripAcid", (float) tilePos.x() + off1, (float) (tilePos.y() - 1) - lOff, (float) tilePos.z() + off2, 0.0F, 0.0F, 0.0F, 0, false); } } diff --git a/game/core/src/main/java/net/minecraft/core/block/FluidLava.java b/game/core/src/main/java/net/minecraft/core/block/FluidLava.java index fc8367a19..911979cc1 100644 --- a/game/core/src/main/java/net/minecraft/core/block/FluidLava.java +++ b/game/core/src/main/java/net/minecraft/core/block/FluidLava.java @@ -2,6 +2,7 @@ package net.minecraft.core.block; import net.minecraft.core.block.material.Material; import net.minecraft.core.block.material.Materials; +import net.minecraft.core.data.gamerule.GameRules; import net.minecraft.core.world.World; import net.minecraft.core.world.pos.TilePos; import net.minecraft.core.world.pos.TilePosc; @@ -29,7 +30,8 @@ public class FluidLava world.spawnParticle("lava", xOff, yOff, zOff, 0.0D, 0.0D, 0.0D, 0, false); } - if (rand.nextInt(4) == 0 && world.getBlockType(tilePos.down(new TilePos())).solid() && !world.getBlockType(tilePos.down(new TilePos()).down()).solid()) { + Block below; + if (rand.nextInt(4) == 0 && world.getBlockType(tilePos.down(new TilePos())).solid() && !(below = world.getBlockType(tilePos.down(new TilePos()).down())).solid() && !Block.hasLogicClass(below, BlockLogicFluid.class)) { float off1 = rand.nextFloat() * 0.9f + 0.05f; float off2 = rand.nextFloat() * 0.9f + 0.05f; world.spawnParticle("dripLava", tilePos.x() + off1, tilePos.y() - 1, tilePos.z() + off2, 0, 0, 0, 0, false); @@ -76,6 +78,7 @@ public class FluidLava @Override public void updateTickStill(final @NotNull BlockLogicFluid logicFluid, final @NotNull World world, final @NotNull TilePosc tilePos, final @NotNull Random rand) { + if (!world.getGameRuleValue(GameRules.DO_FIRE_SPREAD)) return; TilePos p = new TilePos(tilePos); TilePos queryPos = new TilePos(tilePos); final int count = rand.nextInt(3); diff --git a/game/core/src/main/java/net/minecraft/core/block/FluidWater.java b/game/core/src/main/java/net/minecraft/core/block/FluidWater.java index ccbd936ef..435ed8aa1 100644 --- a/game/core/src/main/java/net/minecraft/core/block/FluidWater.java +++ b/game/core/src/main/java/net/minecraft/core/block/FluidWater.java @@ -40,7 +40,8 @@ public class FluidWater } } - if (rand.nextInt(4) == 0 && world.getBlockType(tilePos.down(new TilePos())).solid() && !world.getBlockType(tilePos.down(new TilePos()).down()).solid()) { + Block below; + if (rand.nextInt(4) == 0 && world.getBlockType(tilePos.down(new TilePos())).solid() && !(below = world.getBlockType(tilePos.down(new TilePos()).down())).solid() && !Block.hasLogicClass(below, BlockLogicFluid.class)) { float off1 = rand.nextFloat() * 0.9f + 0.05f; float off2 = rand.nextFloat() * 0.9f + 0.05f; float lOff = 0.01f; // Dumb offset to fix bad lighting diff --git a/game/core/src/main/java/net/minecraft/core/block/entity/TileEntityFlag.java b/game/core/src/main/java/net/minecraft/core/block/entity/TileEntityFlag.java index ffeb31d92..3f44be8fb 100644 --- a/game/core/src/main/java/net/minecraft/core/block/entity/TileEntityFlag.java +++ b/game/core/src/main/java/net/minecraft/core/block/entity/TileEntityFlag.java @@ -103,12 +103,7 @@ public class TileEntityFlag extends TileEntity if (packedColors == null) packedColors = new byte[(CANVAS_WIDTH * CANVAS_HEIGHT) / 4]; byte[] unpackedColors = unpackFlagColors(packedColors); System.arraycopy(unpackedColors, 0, flagColors, 0, CANVAS_WIDTH * CANVAS_HEIGHT); - isDirty = true; - colorHash = 0xFFFFFFFF; - for (int i = 0; i < flagColors.length; i++) { - colorHash ^= flagColors[i] << (8 * (i & 0b11)); - } - + colorsChanged(); UUID ownerUUID = UUIDHelper.readFromTag(compoundTag, "OwnerUUID"); if (ownerUUID == null) { String s = compoundTag.getString("Owner"); @@ -250,6 +245,14 @@ public class TileEntityFlag extends TileEntity isDirty = true; } + public void colorsChanged() { + colorHash = 0xFFFFFFFF; + for (int i = 0; i < flagColors.length; i++) { + colorHash ^= flagColors[i] << (8 * (i & 0b11)); + } + isDirty = true; + } + @Override public @NotNull String getNameTranslationKey() { diff --git a/game/core/src/main/java/net/minecraft/core/entity/animal/MobWolf.java b/game/core/src/main/java/net/minecraft/core/entity/animal/MobWolf.java index b2f036ecd..0cab7a6ba 100644 --- a/game/core/src/main/java/net/minecraft/core/entity/animal/MobWolf.java +++ b/game/core/src/main/java/net/minecraft/core/entity/animal/MobWolf.java @@ -192,7 +192,24 @@ public class MobWolf } } else if (armorTag instanceof CompoundTag compoundTag) { final @Nullable ItemStack armorItem = ItemStack.readItemStackFromNbt(compoundTag); - this.setArmorItem(armorItem); + if (armorItem != null) { + var armor = armorItem.getItem(); + if (armor == Items.ARMOR_CHESTPLATE_LEATHER) { + this.setArmorItem(Items.ARMOR_WOLF_LEATHER.getDefaultStack()); + } else if (armor == Items.ARMOR_CHESTPLATE_CHAINMAIL) { + this.setArmorItem(Items.ARMOR_WOLF_CHAINMAIL.getDefaultStack()); + } else if (armor == Items.ARMOR_CHESTPLATE_IRON) { + this.setArmorItem(Items.ARMOR_WOLF_IRON.getDefaultStack()); + } else if (armor == Items.ARMOR_CHESTPLATE_GOLD) { + this.setArmorItem(Items.ARMOR_WOLF_GOLD.getDefaultStack()); + } else if (armor == Items.ARMOR_CHESTPLATE_STEEL) { + this.setArmorItem(Items.ARMOR_WOLF_STEEL.getDefaultStack()); + } else if (armor == Items.ARMOR_CHESTPLATE_DIAMOND) { + this.setArmorItem(Items.ARMOR_WOLF_DIAMOND.getDefaultStack()); + } else { + this.setArmorItem(armorItem); + } + } } } diff --git a/game/core/src/main/java/net/minecraft/core/entity/player/Player.java b/game/core/src/main/java/net/minecraft/core/entity/player/Player.java index 00c23627a..bbc257449 100644 --- a/game/core/src/main/java/net/minecraft/core/entity/player/Player.java +++ b/game/core/src/main/java/net/minecraft/core/entity/player/Player.java @@ -1826,13 +1826,13 @@ public abstract class Player @Override public @Nullable ItemStack getItemInArmorSlot(final @NotNull HumanArmorShape slot) { - return this.inventory.armorInventory[this.inventory.armorInventory.length - 1 - slot.getSlotIndex()]; + return this.inventory.armorInventory[slot.getSlotIndex()]; } @Override public void setItemInArmorSlot(final @NotNull HumanArmorShape slot, final @Nullable ItemStack item) { if (slot == HumanArmorShape.HEAD || canItemGoInArmorSlot(slot, item)) { - this.inventory.armorInventory[this.inventory.armorInventory.length - 1 - slot.getSlotIndex()] = item; + this.inventory.armorInventory[slot.getSlotIndex()] = item; } } diff --git a/game/core/src/main/java/net/minecraft/core/enums/HumanArmorShape.java b/game/core/src/main/java/net/minecraft/core/enums/HumanArmorShape.java index 85653210e..376da715b 100644 --- a/game/core/src/main/java/net/minecraft/core/enums/HumanArmorShape.java +++ b/game/core/src/main/java/net/minecraft/core/enums/HumanArmorShape.java @@ -1,10 +1,10 @@ package net.minecraft.core.enums; public enum HumanArmorShape implements IArmorShape { - BOOTS(0.94f, 3), - LEGS(0.97f, 6), + HEAD(0.91f, 3), CHEST(1.0f, 8), - HEAD(0.91f, 3); + LEGS(0.97f, 6), + BOOTS(0.94f, 3); private final float durabilityModifier; private final int protectionValue; diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemSlimeball.java b/game/core/src/main/java/net/minecraft/core/item/ItemSlimeball.java index df33c3039..e3bfa5d83 100644 --- a/game/core/src/main/java/net/minecraft/core/item/ItemSlimeball.java +++ b/game/core/src/main/java/net/minecraft/core/item/ItemSlimeball.java @@ -20,7 +20,6 @@ public class ItemSlimeball extends Item { public ItemSlimeball(@NotNull String name, @NotNull String namespaceId, int id) { super(name, namespaceId, id); - this.maxStackSize = 16; } private static boolean useOnBlock( diff --git a/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeParticleId.java b/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeParticleId.java index 359de42bf..3da535677 100644 --- a/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeParticleId.java +++ b/game/core/src/main/java/net/minecraft/core/net/command/arguments/ArgumentTypeParticleId.java @@ -22,6 +22,7 @@ public class ArgumentTypeParticleId implements ArgumentType { static { particleIds.add("note"); particleIds.add("dripLava"); + particleIds.add("dripAcid"); particleIds.add("puffrgb"); particleIds.add("blueflame"); particleIds.add("lava"); diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/CreativeMenuContents.java b/game/core/src/main/java/net/minecraft/core/player/inventory/CreativeMenuContents.java index 176cf952c..8dc5e25ad 100644 --- a/game/core/src/main/java/net/minecraft/core/player/inventory/CreativeMenuContents.java +++ b/game/core/src/main/java/net/minecraft/core/player/inventory/CreativeMenuContents.java @@ -17,6 +17,7 @@ import static net.minecraft.core.player.inventory.menu.MenuInventoryCreative.CRE import static net.minecraft.core.player.inventory.menu.MenuInventoryCreative.CREATIVE_PAGE_SIZE; public final class CreativeMenuContents { + public static boolean ADD_GAPS = false; // Disabled for now, need to discuss full creative gui rework for 8.1 private static final DyeColor[] RAINBOW_ORDER = { DyeColor.RED, @@ -42,6 +43,7 @@ public final class CreativeMenuContents { /** Inserts {@code count} empty slots into the creative grid at the current catalog position. */ public static void addGap(List list, int count) { + if (!ADD_GAPS) return; for (int i = 0; i < count; i++) { list.add(null); } @@ -51,6 +53,7 @@ public final class CreativeMenuContents { * Pads the creative inventory line until the next line is reached. If no spaces need to be filled, nothing happens. */ public static void newLine(@NotNull List list) { + if (!ADD_GAPS) return; int remainder = list.size() % CREATIVE_COLUMNS; if (remainder != 0) { addGap(list, CREATIVE_COLUMNS - remainder); @@ -61,6 +64,7 @@ public final class CreativeMenuContents { * Pads the creative inventory until the next page is reached. */ public static void newPage(@NotNull List list) { + if (!ADD_GAPS) return; int n = list.size(); if (n == 0) { return; diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuInventory.java b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuInventory.java index fb649ac49..3a4a715ed 100644 --- a/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuInventory.java +++ b/game/core/src/main/java/net/minecraft/core/player/inventory/menu/MenuInventory.java @@ -46,7 +46,7 @@ public class MenuInventory extends MenuAbstract { } for (int i = 0; i < ContainerInventory.ARMOR_INVENTORY_SIZE; i++) { - addSlot(new SlotArmor(this, inventory, ContainerInventory.MAIN_INVENTORY_SIZE + i, 8, 8 + i * 18, HumanArmorShape.values()[ContainerInventory.ARMOR_INVENTORY_SIZE - (i + 1)])); + addSlot(new SlotArmor(this, inventory, ContainerInventory.MAIN_INVENTORY_SIZE + i, 8, 8 + i * 18, HumanArmorShape.values()[i])); } for (int y = 0; y < (ContainerInventory.MAIN_INVENTORY_SIZE - ContainerInventory.HOTBAR_SIZE) / NUM_COLUMNS; y++) { diff --git a/game/core/src/main/java/net/minecraft/core/player/inventory/slot/SlotArmor.java b/game/core/src/main/java/net/minecraft/core/player/inventory/slot/SlotArmor.java index 3c1333e38..2f0a0fa70 100644 --- a/game/core/src/main/java/net/minecraft/core/player/inventory/slot/SlotArmor.java +++ b/game/core/src/main/java/net/minecraft/core/player/inventory/slot/SlotArmor.java @@ -19,10 +19,10 @@ import java.util.Set; public class SlotArmor extends Slot { public static String[] armorOutlines = new String[]{ - "minecraft:item/armor_boots_outline", - "minecraft:item/armor_leggings_outline", + "minecraft:item/armor_helmet_outline", "minecraft:item/armor_chestplate_outline", - "minecraft:item/armor_helmet_outline" + "minecraft:item/armor_leggings_outline", + "minecraft:item/armor_boots_outline", }; final HumanArmorShape armorShape; diff --git a/game/core/src/main/java/net/minecraft/core/world/World.java b/game/core/src/main/java/net/minecraft/core/world/World.java index 8677e4835..27a143f3f 100644 --- a/game/core/src/main/java/net/minecraft/core/world/World.java +++ b/game/core/src/main/java/net/minecraft/core/world/World.java @@ -253,7 +253,7 @@ public abstract class World implements MutableWorldSource { parent.levelStorage, null, new LevelData(parent.levelData), - parent.levelStorage.getDimensionData(dimension) + parent.levelStorage.getDimensionDataOrDefault(dimension) ); } diff --git a/game/core/src/main/java/net/minecraft/core/world/save/LevelStorage.java b/game/core/src/main/java/net/minecraft/core/world/save/LevelStorage.java index 3b03fcd78..9d0b16678 100644 --- a/game/core/src/main/java/net/minecraft/core/world/save/LevelStorage.java +++ b/game/core/src/main/java/net/minecraft/core/world/save/LevelStorage.java @@ -65,6 +65,13 @@ public interface LevelStorage extends PlayerIO { */ @Nullable DimensionData getDimensionData(@NotNull Dimension dimension); + /** + * Loads the dimension data for a given dimension. + * @param dimension The dimension whose data should be read. + * @return The dimension data or a default one if none found. + */ + @NotNull DimensionData getDimensionDataOrDefault(@NotNull Dimension dimension); + /** * Loads the dimension data for a given dimension as raw NBT. * @param dimension The dimension whose data should be read. diff --git a/game/core/src/main/java/net/minecraft/core/world/save/LevelStorageBase.java b/game/core/src/main/java/net/minecraft/core/world/save/LevelStorageBase.java index 69fa2e715..30ddbab6a 100644 --- a/game/core/src/main/java/net/minecraft/core/world/save/LevelStorageBase.java +++ b/game/core/src/main/java/net/minecraft/core/world/save/LevelStorageBase.java @@ -9,6 +9,7 @@ import net.minecraft.core.world.Dimension; import net.minecraft.core.world.chunk.ChunkLoaderLegacy; import net.minecraft.core.world.chunk.ChunkLoader; import net.minecraft.core.world.saveddata.SavedDataStorage; +import net.minecraft.core.world.settings.WorldConfiguration; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @@ -114,6 +115,14 @@ public abstract class LevelStorageBase implements LevelStorage return saveFormat.getDimensionData(worldDirName, dimension); } + @Override + public @NotNull DimensionData getDimensionDataOrDefault(@NotNull Dimension dimension) + { + DimensionData data = saveFormat.getDimensionData(worldDirName, dimension); + if (data != null) return data; + return new DimensionData(dimension, new WorldConfiguration()); + } + @Override public @Nullable CompoundTag getDimensionDataRaw(@NotNull Dimension dimension) { diff --git a/game/core/src/main/java/net/minecraft/core/world/save/LevelStorageDummy.java b/game/core/src/main/java/net/minecraft/core/world/save/LevelStorageDummy.java index 5085c760a..244e09f3f 100644 --- a/game/core/src/main/java/net/minecraft/core/world/save/LevelStorageDummy.java +++ b/game/core/src/main/java/net/minecraft/core/world/save/LevelStorageDummy.java @@ -5,6 +5,7 @@ import net.minecraft.core.entity.player.Player; import net.minecraft.core.world.chunk.ChunkLoader; import net.minecraft.core.world.Dimension; import net.minecraft.core.world.saveddata.SavedDataStorage; +import net.minecraft.core.world.settings.WorldConfiguration; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -39,6 +40,11 @@ public class LevelStorageDummy implements LevelStorage return null; } + @Override + public @NotNull DimensionData getDimensionDataOrDefault(@NotNull Dimension dimension) { + return new DimensionData(dimension, new WorldConfiguration()); + } + @Override public @Nullable CompoundTag getDimensionDataRaw(final @NotNull Dimension dimension) { diff --git a/game/core/src/main/resources/assets/minecraft/lang/en_US/gui.lang b/game/core/src/main/resources/assets/minecraft/lang/en_US/gui.lang index f7521cce3..8d0e43643 100644 --- a/game/core/src/main/resources/assets/minecraft/lang/en_US/gui.lang +++ b/game/core/src/main/resources/assets/minecraft/lang/en_US/gui.lang @@ -226,6 +226,7 @@ gui.options.page.player.category.player=Player gui.options.page.audio.title=Audio gui.options.page.audio.category.audio=Audio gui.options.page.audio.category.debug=Debug +gui.options.page.audio.reload=Reload Sound Engine gui.options.page.accessibility.title=Accessibility gui.options.page.accessibility.category.accessibility=Accessibility diff --git a/game/core/src/main/resources/assets/minecraft/lang/en_US/stats.lang b/game/core/src/main/resources/assets/minecraft/lang/en_US/stats.lang index 1fafe463e..ca1dd8f0a 100644 --- a/game/core/src/main/resources/assets/minecraft/lang/en_US/stats.lang +++ b/game/core/src/main/resources/assets/minecraft/lang/en_US/stats.lang @@ -120,4 +120,8 @@ achievement.lightSign.desc=Apply Glowstone Dust to a sign. achievement.mostWanted=Most Wanted achievement.mostWanted.desc=Have more than 10 Zombie Pigmen attack you. achievement.fastTravel=Dimensional Slingshot -achievement.fastTravel.desc=Use the Nether to travel more than 8000 blocks in the Overworld. \ No newline at end of file +achievement.fastTravel.desc=Use the Nether to travel more than 8000 blocks in the Overworld. +achievement.blastFurnace=Blast Processing +achievement.blastFurnace.desc=Construct a blast furnace out of eight iron bars and nether coal. +achievement.obtainSteel=What a Steel! +achievement.obtainSteel.desc=Combine coal and iron to acquire steel, a strong alloy. \ No newline at end of file diff --git a/game/core/src/main/resources/assets/minecraft/lang/en_US/tile.lang b/game/core/src/main/resources/assets/minecraft/lang/en_US/tile.lang index a41e92957..a92cd646b 100644 --- a/game/core/src/main/resources/assets/minecraft/lang/en_US/tile.lang +++ b/game/core/src/main/resources/assets/minecraft/lang/en_US/tile.lang @@ -723,7 +723,7 @@ tile.button.stone.name=Stone Button tile.button.stone.desc=Emits a brief redstone signal when pressed. tile.button.basalt.name=Basalt Button tile.button.basalt.desc=Emits a brief redstone signal when pressed. -tile.button.limestone.name=Limestnoe Button +tile.button.limestone.name=Limestone Button tile.button.limestone.desc=Emits a brief redstone signal when pressed. tile.button.granite.name=Granite Button tile.button.granite.desc=Emits a brief redstone signal when pressed. diff --git a/game/server/src/main/java/net/minecraft/server/net/handler/PacketHandlerServer.java b/game/server/src/main/java/net/minecraft/server/net/handler/PacketHandlerServer.java index c4b7aeb1a..b4b3edf6c 100644 --- a/game/server/src/main/java/net/minecraft/server/net/handler/PacketHandlerServer.java +++ b/game/server/src/main/java/net/minecraft/server/net/handler/PacketHandlerServer.java @@ -766,6 +766,7 @@ public class PacketHandlerServer extends PacketHandler boolean flipped = (header & 0b0000_0001) != 0; System.arraycopy(packetCustomPayload.data, 1, flag.flagColors, 0, TileEntityFlag.CANVAS_WIDTH * TileEntityFlag.CANVAS_HEIGHT); + flag.colorsChanged(); flag.setFlipped(flipped); this.playerEntity.world.markBlockNeedsUpdate(flag.tilePos.x, flag.tilePos.y, flag.tilePos.z); diff --git a/util/datagen/src/main/java/net/minecraft/datagen/WorkbenchGenerator.java b/util/datagen/src/main/java/net/minecraft/datagen/WorkbenchGenerator.java index ae46c6d71..48a5ae1e5 100644 --- a/util/datagen/src/main/java/net/minecraft/datagen/WorkbenchGenerator.java +++ b/util/datagen/src/main/java/net/minecraft/datagen/WorkbenchGenerator.java @@ -1339,10 +1339,19 @@ class WorkbenchGenerator { .addInput('#', Blocks.SAND) .create("tnt", new ItemStack(Blocks.TNT)); - RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput("minecraft:stones").create("stone_button", new ItemStack(Blocks.BUTTON_STONE, 4)); - RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput(Blocks.PLANKS_OAK).create("wooden_button", new ItemStack(Blocks.BUTTON_PLANKS_OAK, 4)); + int buttonYield = 4; + RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput(Blocks.STONE).create("stone_button", new ItemStack(Blocks.BUTTON_STONE, buttonYield)); + RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput(Blocks.BASALT).create("basalt_button", new ItemStack(Blocks.BUTTON_BASALT, buttonYield)); + RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput(Blocks.LIMESTONE).create("limestone_button", new ItemStack(Blocks.BUTTON_LIMESTONE, buttonYield)); + RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput(Blocks.GRANITE).create("granite_button", new ItemStack(Blocks.BUTTON_GRANITE, buttonYield)); + RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput(Blocks.PERMAFROST).create("permafrost_button", new ItemStack(Blocks.BUTTON_PERMAFROST, buttonYield)); + RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput(Blocks.NETHERRACK).create("netherrack_button", new ItemStack(Blocks.BUTTON_NETHERRACK, buttonYield)); + RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput(Blocks.GLOOMSTONE).create("gloomstone_button", new ItemStack(Blocks.BUTTON_GLOOMSTONE, buttonYield)); + RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput(Blocks.SANDSTONE).create("sandstone_button", new ItemStack(Blocks.BUTTON_SANDSTONE, buttonYield)); + RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput(Blocks.BRIMSTONE).create("brimstone_button", new ItemStack(Blocks.BUTTON_BRIMSTONE, buttonYield)); + RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput(Blocks.PLANKS_OAK).create("wooden_button", new ItemStack(Blocks.BUTTON_PLANKS_OAK, buttonYield)); for (DyeColor color : DyeColor.values()) { - RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput(Blocks.PLANKS_OAK_PAINTED, color.blockMeta).create(color.colorID + "_wooden_button", new ItemStack(Blocks.BUTTON_PLANKS_PAINTED, 4, color.blockMeta << 4)); + RecipeBuilder.Shapeless(CORE_NAMESPACE).addInput(Blocks.PLANKS_OAK_PAINTED, color.blockMeta).create(color.colorID + "_wooden_button", new ItemStack(Blocks.BUTTON_PLANKS_PAINTED, buttonYield, color.blockMeta << 4)); } RecipeBuilder.Shaped(CORE_NAMESPACE) @@ -1645,7 +1654,7 @@ class WorkbenchGenerator { "CCC") .addInput('C', cobble) .addInput('A', "minecraft:acid_buckets") - .create("acid_conversion_" + cobbleName, new ItemStack(smooth, 4)); + .create("acid_conversion_" + cobbleName, new ItemStack(smooth, 8)); } } }