Skip to content

Commit 998c183

Browse files
committed
πŸ₯› More Blocks
🌍 World gen changes (BIOMES!)
1 parent 57073d9 commit 998c183

35 files changed

+503
-101
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.james090500.blocks;
2+
3+
public class BirchLogBlock extends Block {
4+
public BirchLogBlock(byte id) {
5+
super(id);
6+
this.name = "Birch Log";
7+
this.sound = "wood";
8+
this.texture = 11;
9+
}
10+
11+
@Override
12+
public float[] getTexture(String face) {
13+
if (face.equalsIgnoreCase("top") || face.equalsIgnoreCase("bottom")) {
14+
return this.textureOffset(9);
15+
} else {
16+
return this.textureOffset(this.texture);
17+
}
18+
}
19+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.james090500.blocks;
2+
3+
public class BirchPlanksBlock extends Block {
4+
public BirchPlanksBlock(byte id) {
5+
super(id);
6+
this.name = "Birch Planks";
7+
this.sound = "wood";
8+
this.texture = 14;
9+
}
10+
}

β€Žsrc/main/java/com/james090500/blocks/Block.javaβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class Block {
66

77
@Getter
88
byte id;
9-
int texture = 14;
9+
int texture = 255;
1010
@Getter
1111
boolean transparent = false;
1212
@Getter

β€Žsrc/main/java/com/james090500/blocks/Blocks.javaβ€Ž

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,17 @@ public class Blocks {
99
public static final StoneBlock stoneBlock = new StoneBlock((byte) 3);
1010
public static final SandBlock sandBlock = new SandBlock((byte) 4);
1111
public static final WaterBlock waterBlock = new WaterBlock((byte) 5);
12-
public static final LogBlock logBlock = new LogBlock((byte) 6);
13-
public static final LeafBlock leafBlock = new LeafBlock((byte) 7);
12+
public static final OakLeafBlock leafBlock = new OakLeafBlock((byte) 6);
13+
public static final SpruceLeafBlock spruceLeafBlock = new SpruceLeafBlock((byte) 7);
14+
public static final OakLogBlock logBlock = new OakLogBlock((byte) 8);
15+
public static final SpruceLogBlock spruceLogBlock = new SpruceLogBlock((byte) 9);
16+
public static final BirchLogBlock birchLogBlock = new BirchLogBlock((byte) 10);
17+
public static final OakPlanksBlock oakPlanksBlock = new OakPlanksBlock((byte) 11);
18+
public static final SprucePlanksBlock sprucePlanksBlock = new SprucePlanksBlock((byte) 12);
19+
public static final BirchPlanksBlock birchPlanksBlock = new BirchPlanksBlock((byte) 13);
20+
public static final GlassBlock glassBlock = new GlassBlock((byte) 14);
21+
public static final SnowyGrassBlock snowyGrassBlock = new SnowyGrassBlock((byte) 15);
22+
public static final CactusBlock cactusBlock = new CactusBlock((byte) 16);
1423

1524
static {
1625
ids = new Block[] {
@@ -20,8 +29,17 @@ public class Blocks {
2029
stoneBlock,
2130
sandBlock,
2231
waterBlock,
32+
leafBlock,
33+
spruceLeafBlock,
2334
logBlock,
24-
leafBlock
35+
spruceLogBlock,
36+
birchLogBlock,
37+
oakPlanksBlock,
38+
sprucePlanksBlock,
39+
birchPlanksBlock,
40+
glassBlock,
41+
snowyGrassBlock,
42+
cactusBlock,
2543
};
2644
}
2745

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.james090500.blocks;
2+
3+
public class CactusBlock extends Block {
4+
public CactusBlock(byte id) {
5+
super(id);
6+
this.name = "Cactus";
7+
this.sound = "cloth";
8+
this.texture = 19;
9+
}
10+
11+
@Override
12+
public float[] getTexture(String face) {
13+
if (face.equalsIgnoreCase("top")) {
14+
return this.textureOffset(18);
15+
} else if (face.equalsIgnoreCase("bottom")) {
16+
return this.textureOffset(20);
17+
} else {
18+
return this.textureOffset(this.texture);
19+
}
20+
}
21+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.james090500.blocks;
2+
3+
public class GlassBlock extends Block {
4+
public GlassBlock(byte id) {
5+
super(id);
6+
this.name = "Glass";
7+
this.sound = "stone";
8+
this.texture = 15;
9+
this.transparent = true;
10+
}
11+
}

β€Žsrc/main/java/com/james090500/blocks/GrassBlock.javaβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public GrassBlock(byte id) {
55
super(id);
66
this.name = "Grass";
77
this.sound = "grass";
8-
this.texture = 3;
8+
this.texture = 1;
99
}
1010

1111
@Override
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package com.james090500.blocks;
22

3-
public class LeafBlock extends Block {
4-
public LeafBlock(byte id) {
3+
public class OakLeafBlock extends Block {
4+
public OakLeafBlock(byte id) {
55
super(id);
66
this.name = "Leaf";
77
this.sound = "grass";
8-
this.texture = 52;
8+
this.texture = 6;
99
this.transparent = true;
1010
}
1111
}

src/main/java/com/james090500/blocks/LogBlock.java renamed to src/main/java/com/james090500/blocks/OakLogBlock.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
package com.james090500.blocks;
22

3-
public class LogBlock extends Block {
4-
public LogBlock(byte id) {
3+
public class OakLogBlock extends Block {
4+
public OakLogBlock(byte id) {
55
super(id);
6-
this.name = "Log";
6+
this.name = "Oak Log";
77
this.sound = "wood";
8-
this.texture = 20;
8+
this.texture = 8;
99
}
1010

1111
@Override
1212
public float[] getTexture(String face) {
1313
if (face.equalsIgnoreCase("top") || face.equalsIgnoreCase("bottom")) {
14-
return this.textureOffset(21);
14+
return this.textureOffset(9);
1515
} else {
1616
return this.textureOffset(this.texture);
1717
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.james090500.blocks;
2+
3+
public class OakPlanksBlock extends Block {
4+
public OakPlanksBlock(byte id) {
5+
super(id);
6+
this.name = "Oak Planks";
7+
this.sound = "wood";
8+
this.texture = 12;
9+
}
10+
}

0 commit comments

Comments
Β (0)