From 0c2ae24652b49add7ca629ccaf971767e80dc3b9 Mon Sep 17 00:00:00 2001 From: PF94 <45898787+flickPF94@users.noreply.github.com> Date: Tue, 24 Nov 2020 20:55:38 -0500 Subject: [PATCH] add three blocks --- .../minecraft/level/tile/DiamondBlock.java | 35 +++++++++++++++++++ .../minecraft/level/tile/GoldBlock.java | 35 +++++++++++++++++++ .../minecraft/level/tile/IronBlock.java | 35 +++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 src/com/mojang/minecraft/level/tile/DiamondBlock.java create mode 100644 src/com/mojang/minecraft/level/tile/GoldBlock.java create mode 100644 src/com/mojang/minecraft/level/tile/IronBlock.java diff --git a/src/com/mojang/minecraft/level/tile/DiamondBlock.java b/src/com/mojang/minecraft/level/tile/DiamondBlock.java new file mode 100644 index 0000000..ad65e85 --- /dev/null +++ b/src/com/mojang/minecraft/level/tile/DiamondBlock.java @@ -0,0 +1,35 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.mojang.minecraft.level.tile; + +import java.util.Random; +import com.mojang.minecraft.level.Level; + +public class DiamondBlock extends Tile +{ + protected DiamondBlock(final int id) { + super(id); + this.tex = 23; + //this.setTicking(true); + } + + @Override + public void tick(final Level level, final int x, final int y, final int z, final Random random) { + final int below = level.getTile(x, y - 1, z); + if (!level.isLit(x, y, z) || (below != Tile.dirt.id && below != Tile.grass.id)) { + level.setTile(x, y, z, 0); + } + } + + @Override + public boolean blocksLight() { + return false; + } + + @Override + public boolean isSolid() { + return true; + } +} diff --git a/src/com/mojang/minecraft/level/tile/GoldBlock.java b/src/com/mojang/minecraft/level/tile/GoldBlock.java new file mode 100644 index 0000000..7ab77cd --- /dev/null +++ b/src/com/mojang/minecraft/level/tile/GoldBlock.java @@ -0,0 +1,35 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.mojang.minecraft.level.tile; + +import java.util.Random; +import com.mojang.minecraft.level.Level; + +public class GoldBlock extends Tile +{ + protected GoldBlock(final int id) { + super(id); + this.tex = 39; + //this.setTicking(true); + } + + @Override + public void tick(final Level level, final int x, final int y, final int z, final Random random) { + final int below = level.getTile(x, y - 1, z); + if (!level.isLit(x, y, z) || (below != Tile.dirt.id && below != Tile.grass.id)) { + level.setTile(x, y, z, 0); + } + } + + @Override + public boolean blocksLight() { + return false; + } + + @Override + public boolean isSolid() { + return true; + } +} diff --git a/src/com/mojang/minecraft/level/tile/IronBlock.java b/src/com/mojang/minecraft/level/tile/IronBlock.java new file mode 100644 index 0000000..4b94a21 --- /dev/null +++ b/src/com/mojang/minecraft/level/tile/IronBlock.java @@ -0,0 +1,35 @@ +// +// Decompiled by Procyon v0.5.36 +// + +package com.mojang.minecraft.level.tile; + +import java.util.Random; +import com.mojang.minecraft.level.Level; + +public class IronBlock extends Tile +{ + protected IronBlock(final int id) { + super(id); + this.tex = 38; + //this.setTicking(true); + } + + @Override + public void tick(final Level level, final int x, final int y, final int z, final Random random) { + final int below = level.getTile(x, y - 1, z); + if (!level.isLit(x, y, z) || (below != Tile.dirt.id && below != Tile.grass.id)) { + level.setTile(x, y, z, 0); + } + } + + @Override + public boolean blocksLight() { + return false; + } + + @Override + public boolean isSolid() { + return true; + } +}