Skip to content

Commit

Permalink
Renamed grating to iron grating
Browse files Browse the repository at this point in the history
  • Loading branch information
DMgaming100 committed Oct 1, 2024
1 parent 0fc27e0 commit 010b8ff
Show file tree
Hide file tree
Showing 24 changed files with 51 additions and 51 deletions.
10 changes: 0 additions & 10 deletions src/main/generated/assets/galacticraft/blockstates/grating.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"state=lower": {
"model": "galacticraft:block/iron_grating_lower"
},
"state=upper": {
"model": "galacticraft:block/iron_grating_upper"
}
}
}
2 changes: 1 addition & 1 deletion src/main/generated/assets/galacticraft/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"block.galacticraft.glass_fluid_pipe": "Glass Fluid Pipe",
"block.galacticraft.glowstone_lantern": "Glowstone Lantern",
"block.galacticraft.glowstone_torch": "Glowstone Torch",
"block.galacticraft.grating": "Grating",
"block.galacticraft.iron_grating": "Iron Grating",
"block.galacticraft.gray_candle_moon_cheese_wheel": "Block of Cheese with Gray Candle",
"block.galacticraft.green_candle_moon_cheese_wheel": "Block of Cheese with Green Candle",
"block.galacticraft.hard_venus_rock": "Hard Venus Rock",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "galacticraft:block/iron_grating_lower"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"has_the_recipe": {
"conditions": {
"recipe": "galacticraft:grating"
"recipe": "galacticraft:iron_grating"
},
"trigger": "minecraft:recipe_unlocked"
}
Expand All @@ -26,7 +26,7 @@
],
"rewards": {
"recipes": [
"galacticraft:grating"
"galacticraft:iron_grating"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"entries": [
{
"type": "minecraft:item",
"name": "galacticraft:grating"
"name": "galacticraft:iron_grating"
}
],
"rolls": 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
],
"result": {
"count": 4,
"id": "galacticraft:grating"
"id": "galacticraft:iron_grating"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"galacticraft:rocket_launch_pad",
"galacticraft:glowstone_lantern",
"galacticraft:unlit_lantern",
"galacticraft:grating",
"galacticraft:iron_grating",
"galacticraft:walkway",
"galacticraft:wire_walkway",
"galacticraft:fluid_pipe_walkway",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"values": [
"galacticraft:grating",
"galacticraft:iron_grating",
"galacticraft:walkway",
"galacticraft:wire_walkway",
"galacticraft:fluid_pipe_walkway",
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/galacticraft/mod/Constant.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ interface Block {
String TITANIUM_DECORATION = "titanium_decoration";
String DARK_DECORATION = "dark_decoration";

String GRATING = "grating";
String IRON_GRATING = "iron_grating";
String TIN_LADDER = "tin_ladder";
String SQUARE_LIGHT_PANEL = "square_light_panel";
String SPOTLIGHT_LIGHT_PANEL = "spotlight_light_panel";
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/galacticraft/mod/GalacticraftClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void onInitializeClient() {
BlockRenderLayerMap.INSTANCE.putBlock(GCBlocks.WALKWAY, RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(GCBlocks.WIRE_WALKWAY, RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(GCBlocks.FLUID_PIPE_WALKWAY, RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(GCBlocks.GRATING, RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(GCBlocks.IRON_GRATING, RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(GCBlocks.GLOWSTONE_TORCH, RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(GCBlocks.GLOWSTONE_WALL_TORCH, RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(GCBlocks.UNLIT_TORCH, RenderType.cutout());
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dev/galacticraft/mod/content/GCBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import dev.galacticraft.mod.Constant;
import dev.galacticraft.mod.content.GCBlockRegistry.DecorationSet;
import dev.galacticraft.mod.content.block.boss.BossSpawner;
import dev.galacticraft.mod.content.block.decoration.GratingBlock;
import dev.galacticraft.mod.content.block.decoration.IronGratingBlock;
import dev.galacticraft.mod.content.block.decoration.LightPanelBlock;
import dev.galacticraft.mod.content.block.decoration.LunarCartographyTableBlock;
import dev.galacticraft.mod.content.block.decoration.VacuumGlassBlock;
Expand Down Expand Up @@ -196,7 +196,7 @@ public class GCBlocks {
public static final Block FLUID_PIPE_WALKWAY = BLOCKS.register(Constant.Block.FLUID_PIPE_WALKWAY, new FluidPipeWalkway(BlockBehaviour.Properties.ofFullCopy(WALKWAY)));
public static final Block WIRE_WALKWAY = BLOCKS.register(Constant.Block.WIRE_WALKWAY, new WireWalkway(BlockBehaviour.Properties.ofFullCopy(WALKWAY)));
public static final Block TIN_LADDER = BLOCKS.register(Constant.Block.TIN_LADDER, new TinLadderBlock(BlockBehaviour.Properties.of().forceSolidOff().noOcclusion().pushReaction(PushReaction.DESTROY).strength(1.0f, 1.0f).sound(SoundType.METAL).requiresCorrectToolForDrops()));
public static final Block GRATING = BLOCKS.register(Constant.Block.GRATING, new GratingBlock(BlockBehaviour.Properties.of().mapColor(MapColor.STONE).strength(2.5f, 6.0f).sound(SoundType.METAL).requiresCorrectToolForDrops().noOcclusion()));
public static final Block IRON_GRATING = BLOCKS.register(Constant.Block.IRON_GRATING, new IronGratingBlock(BlockBehaviour.Properties.of().mapColor(MapColor.STONE).strength(2.5f, 6.0f).sound(SoundType.METAL).requiresCorrectToolForDrops().noOcclusion()));

// SPECIAL
public static final Block ALUMINUM_WIRE = BLOCKS.register(Constant.Block.ALUMINUM_WIRE, new AluminumWireBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.WHITE_WOOL)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@

import java.util.Optional;

public class GratingBlock extends Block implements FluidLoggable {
public class IronGratingBlock extends Block implements FluidLoggable {
@VisibleForTesting
public static final EnumProperty<State> STATE = EnumProperty.create("state", State.class);
private static final VoxelShape UPPER_SHAPE = Block.box(0.0D, 14.0D, 0.0D, 16.0D, 16.0D, 16.0D);
private static final VoxelShape LOWER_SHAPE = Block.box(0.0D, 6.0D, 0.0D, 16.0D, 8.0D, 16.0D);

public GratingBlock(Properties settings) {
public IronGratingBlock(Properties settings) {
super(settings);
this.registerDefaultState(this.getStateDefinition().any()
.setValue(FLUID, ResourceLocation.withDefaultNamespace("invalid"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public class GCCreativeModeTabs {
output.accept(WIRE_WALKWAY);
output.accept(FLUID_PIPE_WALKWAY);
output.accept(TIN_LADDER);
output.accept(GRATING);
output.accept(IRON_GRATING);

// SPECIAL
output.accept(ALUMINUM_WIRE);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dev/galacticraft/mod/content/item/GCItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public class GCItems {
public static final Item FLUID_PIPE_WALKWAY = new BlockItem(GCBlocks.FLUID_PIPE_WALKWAY, new Item.Properties());
public static final Item WIRE_WALKWAY = new BlockItem(GCBlocks.WIRE_WALKWAY, new Item.Properties());
public static final Item TIN_LADDER = new BlockItem(GCBlocks.TIN_LADDER, new Item.Properties());
public static final Item GRATING = new BlockItem(GCBlocks.GRATING, new Item.Properties());
public static final Item IRON_GRATING = new BlockItem(GCBlocks.IRON_GRATING, new Item.Properties());

// SPECIAL
public static final Item ALUMINUM_WIRE = new BlockItem(GCBlocks.ALUMINUM_WIRE, new Item.Properties());
Expand Down Expand Up @@ -540,7 +540,7 @@ public static void register() {
Registry.register(BuiltInRegistries.ITEM, Constant.id(Constant.Block.FLUID_PIPE_WALKWAY), FLUID_PIPE_WALKWAY);
Registry.register(BuiltInRegistries.ITEM, Constant.id(Constant.Block.WIRE_WALKWAY), WIRE_WALKWAY);
Registry.register(BuiltInRegistries.ITEM, Constant.id(Constant.Block.TIN_LADDER), TIN_LADDER);
Registry.register(BuiltInRegistries.ITEM, Constant.id(Constant.Block.GRATING), GRATING);
Registry.register(BuiltInRegistries.ITEM, Constant.id(Constant.Block.IRON_GRATING), IRON_GRATING);

// SPECIAL
Registry.register(BuiltInRegistries.ITEM, Constant.id(Constant.Block.ALUMINUM_WIRE), ALUMINUM_WIRE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void generate() {
this.dropSelf(GCBlocks.FLUID_PIPE_WALKWAY);
this.dropSelf(GCBlocks.WIRE_WALKWAY);
this.dropSelf(GCBlocks.TIN_LADDER);
this.dropSelf(GCBlocks.GRATING);
this.dropSelf(GCBlocks.IRON_GRATING);

this.dropSelf(GCBlocks.ALUMINUM_WIRE);
this.dropSelf(GCBlocks.SEALABLE_ALUMINUM_WIRE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import dev.galacticraft.mod.Constant;
import dev.galacticraft.mod.content.GCBlockRegistry;
import dev.galacticraft.mod.content.GCBlocks;
import dev.galacticraft.mod.content.block.decoration.GratingBlock;
import dev.galacticraft.mod.content.block.decoration.IronGratingBlock;
import dev.galacticraft.mod.content.block.environment.CavernousVines;
import dev.galacticraft.mod.content.block.special.ParaChestBlock;
import dev.galacticraft.mod.content.block.special.launchpad.AbstractLaunchPad;
Expand Down Expand Up @@ -118,7 +118,7 @@ public void generateBlockStateModels(BlockModelGenerators generator) {
// MISC DECOR
generator.createNonTemplateHorizontalBlock(GCBlocks.TIN_LADDER);
generator.createSimpleFlatItemModel(GCBlocks.TIN_LADDER);
this.createGrating(generator);
this.createIronGrating(generator);

// SPECIAL
this.createAutoGeneratedModel(generator, GCBlocks.WALKWAY, Constant.BakedModel.WALKWAY_MARKER);
Expand Down Expand Up @@ -295,12 +295,12 @@ private void createAutoGeneratedModel(BlockModelGenerators generator, Block bloc
generator.blockStateOutput.accept(BlockModelGenerators.createSimpleBlock(block, id));
}

private void createGrating(BlockModelGenerators generator) {
var block = GCBlocks.GRATING;
private void createIronGrating(BlockModelGenerators generator) {
var block = GCBlocks.IRON_GRATING;
generator.blockStateOutput.accept(MultiVariantGenerator.multiVariant(block)
.with(PropertyDispatch.property(GratingBlock.STATE)
.select(GratingBlock.State.LOWER, Variant.variant().with(VariantProperties.MODEL, ModelLocationUtils.getModelLocation(block, "_lower")))
.select(GratingBlock.State.UPPER, Variant.variant().with(VariantProperties.MODEL, ModelLocationUtils.getModelLocation(block, "_upper")))));
.with(PropertyDispatch.property(IronGratingBlock.STATE)
.select(IronGratingBlock.State.LOWER, Variant.variant().with(VariantProperties.MODEL, ModelLocationUtils.getModelLocation(block, "_lower")))
.select(IronGratingBlock.State.UPPER, Variant.variant().with(VariantProperties.MODEL, ModelLocationUtils.getModelLocation(block, "_upper")))));
generator.delegateItemModel(block, ModelLocationUtils.getModelLocation(block, "_lower"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public void buildRecipes(RecipeOutput output) {
.save(output);

// Misc decoration blocks
ShapedRecipeBuilder.shaped(RecipeCategory.BUILDING_BLOCKS, GCItems.GRATING, 4)
ShapedRecipeBuilder.shaped(RecipeCategory.BUILDING_BLOCKS, GCItems.IRON_GRATING, 4)
.define('I', Items.IRON_BARS)
.pattern("II")
.pattern("II")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ protected void addTags(HolderLookup.Provider provider) {
GCBlocks.ROCKET_LAUNCH_PAD,
GCBlocks.GLOWSTONE_LANTERN,
GCBlocks.UNLIT_LANTERN,
GCBlocks.GRATING,
GCBlocks.IRON_GRATING,
GCBlocks.WALKWAY,
GCBlocks.WIRE_WALKWAY,
GCBlocks.FLUID_PIPE_WALKWAY,
Expand Down Expand Up @@ -272,7 +272,7 @@ protected void addTags(HolderLookup.Provider provider) {

this.tag(BlockTags.NEEDS_STONE_TOOL)
.add(
GCBlocks.GRATING,
GCBlocks.IRON_GRATING,
GCBlocks.WALKWAY,
GCBlocks.WIRE_WALKWAY,
GCBlocks.FLUID_PIPE_WALKWAY,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"parent": "block/block",
"textures": {
"particle": "galacticraft:block/grating",
"grating": "galacticraft:block/grating"
"particle": "galacticraft:block/iron_grating",
"grating": "galacticraft:block/iron_grating"
},
"display": {
"thirdperson_righthand": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"textures": {
"particle": "galacticraft:block/grating",
"grating": "galacticraft:block/grating"
"particle": "galacticraft:block/iron_grating",
"grating": "galacticraft:block/iron_grating"
},
"elements": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import dev.galacticraft.mod.api.block.FluidLoggable;
import dev.galacticraft.mod.content.GCBlocks;
import dev.galacticraft.mod.content.block.decoration.GratingBlock;
import dev.galacticraft.mod.content.block.decoration.IronGratingBlock;
import net.minecraft.core.BlockPos;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.gametest.framework.GameTest;
Expand All @@ -49,7 +49,7 @@ public void gratingFlowingWaterTest(GameTestHelper context) {
final var pos2 = new BlockPos(xz, 2, xz);
final var pos1 = new BlockPos(xz, 1, xz);
final var mutable = new BlockPos.MutableBlockPos();
context.setBlock(pos2, GCBlocks.GRATING.defaultBlockState().setValue(GratingBlock.STATE, GratingBlock.State.LOWER));
context.setBlock(pos2, GCBlocks.IRON_GRATING.defaultBlockState().setValue(IronGratingBlock.STATE, IronGratingBlock.State.LOWER));

if (!context.getBlockState(pos2).getFluidState().isEmpty()) {
context.fail(String.format("Expected grating to not be filled with fluid but found %s instead!", BuiltInRegistries.FLUID.getKey(context.getBlockState(pos2).getFluidState().getType())), pos2);
Expand Down Expand Up @@ -100,7 +100,7 @@ public void gratingFlowingWaterWithFallingStateTest(GameTestHelper context) {
}
}

var grating = GCBlocks.GRATING.defaultBlockState().setValue(GratingBlock.STATE, GratingBlock.State.LOWER);
var grating = GCBlocks.IRON_GRATING.defaultBlockState().setValue(IronGratingBlock.STATE, IronGratingBlock.State.LOWER);
var gratingWaterPos = BlockPos.ZERO;

for (var z = 1; z < 7; z++) {
Expand Down Expand Up @@ -134,7 +134,7 @@ public void dispenserDispenseFluidToGrating(GameTestHelper context) {
final var pos1 = new BlockPos(3, 0, 5);
final var pos2 = new BlockPos(3, 1, 5);
final var pos3 = new BlockPos(3, 0, 4);
var grating = GCBlocks.GRATING.defaultBlockState().setValue(GratingBlock.STATE, GratingBlock.State.LOWER);
var grating = GCBlocks.IRON_GRATING.defaultBlockState().setValue(IronGratingBlock.STATE, IronGratingBlock.State.LOWER);

context.setBlock(pos1, Blocks.DISPENSER.defaultBlockState());
context.setBlock(pos3, grating);
Expand All @@ -158,7 +158,7 @@ public void dispenserDispenseFluidToGrating(GameTestHelper context) {
// final var pos1 = new BlockPos(3, 0, 5);
// final var pos2 = new BlockPos(3, 1, 5);
// final var pos3 = new BlockPos(3, 0, 4);
// var grating = GCBlocks.GRATING.defaultBlockState().setValue(GratingBlock.STATE, GratingBlock.State.LOWER);
// var grating = GCBlocks.IRON_GRATING.defaultBlockState().setValue(IronGratingBlock.STATE, IronGratingBlock.State.LOWER);
//
// context.setBlock(pos1, Blocks.DISPENSER.defaultBlockState());
// context.setBlock(pos3, grating);
Expand All @@ -181,7 +181,7 @@ public void dispenserPickupFluidFromGrating(GameTestHelper context) {
final var pos1 = new BlockPos(3, 0, 5);
final var pos2 = new BlockPos(3, 1, 5);
final var pos3 = new BlockPos(3, 0, 4);
var grating = GCBlocks.GRATING.defaultBlockState().setValue(GratingBlock.STATE, GratingBlock.State.LOWER).setValue(FluidLoggable.FLUID, BuiltInRegistries.FLUID.getKey(Fluids.WATER));
var grating = GCBlocks.IRON_GRATING.defaultBlockState().setValue(IronGratingBlock.STATE, IronGratingBlock.State.LOWER).setValue(FluidLoggable.FLUID, BuiltInRegistries.FLUID.getKey(Fluids.WATER));

context.setBlock(pos1, Blocks.DISPENSER.defaultBlockState());
context.setBlock(pos3, grating);
Expand All @@ -205,7 +205,7 @@ public void dispenserPickupFluidFromGrating(GameTestHelper context) {
// final var pos1 = new BlockPos(3, 0, 5);
// final var pos2 = new BlockPos(3, 1, 5);
// final var pos3 = new BlockPos(3, 0, 4);
// var grating = GCBlocks.GRATING.defaultBlockState().setValue(GratingBlock.STATE, GratingBlock.State.LOWER).setValue(FluidLoggable.FLUID, BuiltInRegistries.FLUID.getKey(GCFluids.FUEL));
// var grating = GCBlocks.IRON_GRATING.defaultBlockState().setValue(IronGratingBlock.STATE, IronGratingBlock.State.LOWER).setValue(FluidLoggable.FLUID, BuiltInRegistries.FLUID.getKey(GCFluids.FUEL));
//
// context.setBlock(pos1, Blocks.DISPENSER.defaultBlockState());
// context.setBlock(pos3, grating);
Expand Down

0 comments on commit 010b8ff

Please sign in to comment.