Skip to content

Commit 9b23fc8

Browse files
committed
Backport 0.15.9 to 1.20.1
1 parent a7d38b1 commit 9b23fc8

File tree

4,197 files changed

+4796
-3764
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,197 files changed

+4796
-3764
lines changed

build.gradle

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
2-
id 'dev.architectury.loom' version '1.6-SNAPSHOT' apply false
2+
id 'dev.architectury.loom' version '1.7-SNAPSHOT' apply false
33
id 'architectury-plugin' version '3.4-SNAPSHOT'
44
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
5-
id "io.github.pacifistmc.forgix" version "1.2.9-local.7"
5+
id "io.github.pacifistmc.forgix" version "1.2.9-local.10"
66
}
77

88
architectury {
@@ -11,12 +11,20 @@ architectury {
1111

1212
allprojects {
1313
group = rootProject.maven_group
14-
version = rootProject.mod_version
15-
}
14+
version = mod_version + "+" + minecraft_version}
1615

1716
forgix {
1817
group = "cc.cassian.pyrite"
1918
mergedJarName = "pyrite-${version}.jar"
19+
forge {
20+
projectName = "forge"
21+
jarLocation = "build/libs/pyrite-forge-${version}.jar"
22+
}
23+
24+
fabric {
25+
projectName = "fabric"
26+
jarLocation = "build/libs/pyrite-fabric-${version}.jar"
27+
}
2028
}
2129

2230
subprojects {

common/src/main/java/cc/cassian/pyrite/Pyrite.java

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package cc.cassian.pyrite;
22

33
import cc.cassian.pyrite.functions.ModHelpers;
4+
import cc.cassian.pyrite.functions.ModLists;
45
import net.minecraft.block.*;
56
import net.minecraft.particle.DustParticleEffect;
67
import net.minecraft.particle.ParticleTypes;
@@ -12,11 +13,11 @@
1213
import static cc.cassian.pyrite.functions.ModHelpers.*;
1314

1415
public class Pyrite {
15-
public final static String MOD_ID = "pyrite";
16+
public static final String MOD_ID = "pyrite";
1617
public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
1718

18-
19-
public static void init() {
19+
public static void init() {
20+
ModLists.populateLinkedHashMaps();
2021
// Framed Glass
2122
createPyriteBlock("framed_glass","glass", 2.0f, MapColor.CLEAR, 0);
2223
// Framed Glass Pane
@@ -25,7 +26,8 @@ public static void init() {
2526
createPyriteBlock("switchable_glass", "switchable_glass", Blocks.GLASS);
2627
// Cobblestone Bricks
2728
generateBrickSet("cobblestone_brick", Blocks.COBBLESTONE, MapColor.STONE_GRAY, true);
28-
// Smooth Stone Bricks
29+
// Smooth Stone Set
30+
createPyriteBlock("smooth_stone_stairs", "stairs", Blocks.SMOOTH_STONE);
2931
generateBrickSet("smooth_stone_brick", Blocks.SMOOTH_STONE, MapColor.STONE_GRAY, true);
3032
// Granite Bricks
3133
generateBrickSet("granite_brick", Blocks.GRANITE, MapColor.DIRT_BROWN, true);
@@ -35,10 +37,13 @@ public static void init() {
3537
generateBrickSet("diorite_brick", Blocks.DIORITE, MapColor.OFF_WHITE, true);
3638
// Calcite Bricks
3739
generateBrickSet("calcite_brick", Blocks.CALCITE, MapColor.OFF_WHITE, true);
40+
// Mossy Tuff Bricks
3841
// Mossy Deepslate Bricks
39-
generateBrickSet("mossy_deepslate_brick", Blocks.DEEPSLATE_BRICKS, MapColor.BLACK);
42+
generateBrickSet("mossy_deepslate_brick", Blocks.DEEPSLATE_BRICKS);
4043
// Sandstone Bricks
41-
generateBrickSet("sandstone_brick", Blocks.SANDSTONE, MapColor.PALE_YELLOW);
44+
generateBrickSet("sandstone_brick", Blocks.SANDSTONE);
45+
// Terracotta Bricks
46+
generateBrickSet("terracotta_brick", Blocks.TERRACOTTA);
4247
// Grass Set
4348
generateTurfSets();
4449
// Nether Brick Fence Gate
@@ -48,10 +53,10 @@ public static void init() {
4853
// Torch Levers
4954
createTorchLever("torch_lever", Blocks.TORCH, ParticleTypes.FLAME);
5055
createTorchLever("redstone_torch_lever", Blocks.SOUL_TORCH, DustParticleEffect.DEFAULT);
51-
createTorchLever("soul_torch_lever", Blocks.TORCH, ParticleTypes.SOUL_FIRE_FLAME);
56+
createTorchLever("soul_torch_lever", Blocks.SOUL_TORCH, ParticleTypes.SOUL_FIRE_FLAME);
5257
// Lamps
53-
createPyriteBlock("lit_redstone_lamp", "block", Blocks.REDSTONE_LAMP, 15);
54-
createPyriteBlock("glowstone_lamp","block", 0.3f, MapColor.YELLOW, 15);
58+
createPyriteBlock("lit_redstone_lamp", "lamp", Blocks.REDSTONE_LAMP, 15);
59+
createPyriteBlock("glowstone_lamp","lamp", 0.3f, MapColor.YELLOW, 15);
5560
// Classic Features
5661
createPyriteBlock("glowing_obsidian","obsidian", 50f, MapColor.RED, 15);
5762
createPyriteBlock("nostalgia_glowing_obsidian","obsidian", 50f, MapColor.RED, 15);
@@ -68,21 +73,19 @@ public static void init() {
6873
// Modded Crafting Tables
6974
if (ModHelpers.isModLoaded("aether")) {
7075
createPyriteBlock("skyroot_crafting_table","crafting", Blocks.CRAFTING_TABLE);
71-
createPyriteBlock( "holystone_wall_gate","fence_gate", Blocks.STONE);
72-
createPyriteBlock( "mossy_holystone_wall_gate","fence_gate", Blocks.STONE);
73-
createPyriteBlock( "holystone_brick_wall_gate","fence_gate", Blocks.STONE);
74-
createPyriteBlock( "icestone_wall_gate","fence_gate", Blocks.STONE);
75-
createPyriteBlock( "aerogel_wall_gate","fence_gate", Blocks.STONE);
76-
createPyriteBlock( "carved_wall_gate","fence_gate", Blocks.STONE);
77-
createPyriteBlock( "angelic_wall_gate","fence_gate", Blocks.STONE);
78-
createPyriteBlock( "hellfire_wall_gate","fence_gate", Blocks.STONE);
79-
80-
76+
createPyriteBlock( "holystone_wall_gate","wall_gate", Blocks.STONE, BlockSetType.STONE);
77+
createPyriteBlock( "mossy_holystone_wall_gate","wall_gate", Blocks.STONE, BlockSetType.STONE);
78+
createPyriteBlock( "holystone_brick_wall_gate","wall_gate", Blocks.STONE, BlockSetType.STONE);
79+
createPyriteBlock( "icestone_wall_gate","wall_gate", Blocks.STONE, BlockSetType.STONE);
80+
createPyriteBlock( "aerogel_wall_gate","wall_gate", Blocks.STONE, BlockSetType.STONE);
81+
createPyriteBlock( "carved_wall_gate","wall_gate", Blocks.STONE, BlockSetType.STONE);
82+
createPyriteBlock( "angelic_wall_gate","wall_gate", Blocks.STONE, BlockSetType.STONE);
83+
createPyriteBlock( "hellfire_wall_gate","wall_gate", Blocks.STONE, BlockSetType.STONE);
8184
}
82-
// Red Mushroom Blocks
85+
// Red Mushroom Wood Set
8386
createPyriteBlock("red_mushroom_stem", "log", Blocks.MUSHROOM_STEM);
8487
createWoodSet("red_mushroom", MapColor.RED, 0);
85-
// Brown Mushroom Blocks
88+
// Brown Mushroom Wood Set
8689
createPyriteBlock("brown_mushroom_stem", "log", Blocks.MUSHROOM_STEM);
8790
createWoodSet("brown_mushroom", MapColor.BROWN, 0);
8891
// Azalea Wood Set
@@ -106,9 +109,9 @@ public static void init() {
106109
createPyriteBlock(dye+"_concrete_powder", "concrete_powder", Blocks.WHITE_CONCRETE_POWDER, color, blockLux);
107110
}
108111
// Dyed Concrete Stairs
109-
createPyriteBlock( dye+"_concrete_stairs", "stairs", Blocks.WHITE_CONCRETE, color, blockLux);
112+
createPyriteBlock(dye+"_concrete_stairs", "stairs", Blocks.WHITE_CONCRETE, color, blockLux);
110113
// Dyed Concrete Slab
111-
createPyriteBlock( dye+"_concrete_slab", "slab", Blocks.WHITE_CONCRETE, color, blockLux);
114+
createPyriteBlock(dye+"_concrete_slab", "slab", Blocks.WHITE_CONCRETE, color, blockLux);
112115
//Dyed Planks and plank products
113116
createWoodSet(dye + "_stained", color, blockLux);
114117
// Dyed Bricks and brick products
@@ -123,18 +126,20 @@ public static void init() {
123126
generateBrickSet(dye+"_terracotta_brick", Blocks.TERRACOTTA, color, blockLux);
124127
// Dyed Torches
125128
createTorch(dye+"_torch", getTorchParticle(dye));
129+
if (dyeIndex > 15) {
130+
// Dyed Stained Glass
131+
createPyriteBlock(dye+"_stained_glass","stained_framed_glass", 0.3f, color, blockLux);
132+
// Dyed Stained Glass Pane
133+
createPyriteBlock(dye+"_stained_glass_pane","stained_framed_glass_pane", 0.3f, color, blockLux);
134+
}
126135
// Dyed Lamps
127-
createPyriteBlock(dye + "_lamp","block", 0.3f, color, 15);
136+
createPyriteBlock(dye + "_lamp","lamp", 0.3f, color, 15);
128137
// Dyed Framed Glass
129138
createPyriteBlock(dye+"_framed_glass","stained_framed_glass", 2.0f, color, blockLux);
130139
// Dyed Framed Glass Pane
131140
createPyriteBlock( dye+"_framed_glass_pane","stained_framed_glass_pane", 2.0f, color, blockLux);
132141
// Dyed Torch Levers
133142
createTorchLever(dye+"_torch_lever", Blocks.TORCH, getTorchParticle(dye));
134-
135-
136-
137-
138143
}
139144
// Autogenerate Wall Gates
140145
for (Block wallsBlock : getVanillaWalls()) {
@@ -145,11 +150,7 @@ public static void init() {
145150
block = block + "_wall";
146151
}
147152
//Create block.
148-
createPyriteBlock(block + "_gate","fence_gate", wallsBlock);
153+
createPyriteBlock(block + "_gate","wall_gate", wallsBlock, BlockSetType.STONE);
149154
}
150155
}
151-
152-
153-
154-
155156
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package cc.cassian.pyrite.blocks;
2+
3+
import net.minecraft.block.*;
4+
import net.minecraft.util.math.BlockPos;
5+
import net.minecraft.util.math.Direction;
6+
import net.minecraft.util.shape.VoxelShape;
7+
import net.minecraft.world.BlockView;
8+
9+
public class WallGateBlock extends FenceGateBlock {
10+
11+
protected static final VoxelShape Z_AXIS_SHAPE;
12+
protected static final VoxelShape X_AXIS_SHAPE;
13+
protected static final VoxelShape IN_WALL_Z_AXIS_SHAPE;
14+
protected static final VoxelShape IN_WALL_X_AXIS_SHAPE;
15+
16+
public WallGateBlock(Settings settings) {
17+
super(settings, WoodType.CRIMSON);
18+
}
19+
20+
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
21+
if (state.get(IN_WALL)) {
22+
return state.get(FACING).getAxis() == Direction.Axis.X ? IN_WALL_X_AXIS_SHAPE : IN_WALL_Z_AXIS_SHAPE;
23+
} else {
24+
return state.get(FACING).getAxis() == Direction.Axis.X ? X_AXIS_SHAPE : Z_AXIS_SHAPE;
25+
}
26+
}
27+
28+
static {
29+
Z_AXIS_SHAPE = Block.createCuboidShape(0.0F, 2.0F, 6.0F, 16.0F, 13.0F, 10.0F);
30+
X_AXIS_SHAPE = Block.createCuboidShape(6.0F, 2.0F, 0.0F, 10.0F, 13.0F, 16.0F);
31+
IN_WALL_Z_AXIS_SHAPE = Block.createCuboidShape(0.0F, 0.0F, 6.0F, 16.0F, 13.0F, 10.0F);
32+
IN_WALL_X_AXIS_SHAPE = Block.createCuboidShape(6.0F, 0.0F, 0.0F, 10.0F, 13.0F, 16.0F);
33+
}
34+
}

0 commit comments

Comments
 (0)