-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial crusher menu, some temp names/recipes
- Loading branch information
Showing
78 changed files
with
1,523 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 20 additions & 1 deletion
21
src/main/java/com/fureniku/roads/blockentities/CrusherBlockEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,32 @@ | ||
package com.fureniku.roads.blockentities; | ||
|
||
import com.fureniku.metropolis.blockentity.MetroBlockEntity; | ||
import com.fureniku.roads.blockentities.menus.CrusherMenu; | ||
import com.fureniku.roads.blocks.entityblock.CrusherEntityBlock; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.world.MenuProvider; | ||
import net.minecraft.world.entity.player.Inventory; | ||
import net.minecraft.world.entity.player.Player; | ||
import net.minecraft.world.inventory.AbstractContainerMenu; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class CrusherBlockEntity extends MetroBlockEntity { | ||
public class CrusherBlockEntity extends MetroBlockEntity implements MenuProvider { | ||
|
||
public CrusherBlockEntity(BlockPos pos, BlockState state) { | ||
super(CrusherEntityBlock.ENTITY.get(), pos, state); | ||
} | ||
|
||
@Override | ||
public Component getDisplayName() { | ||
//return Component.translatable("blah.blah.blah"); | ||
return Component.literal("Crusher (localise me)"); | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public AbstractContainerMenu createMenu(int id, Inventory inventory, Player p_39956_) { | ||
return new CrusherMenu(id, inventory); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/main/java/com/fureniku/roads/client/screens/CrusherScreen.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.fureniku.roads.client.screens; | ||
|
||
import com.fureniku.roads.FurenikusRoads; | ||
import com.fureniku.roads.blockentities.menus.CrusherMenu; | ||
import com.mojang.blaze3d.systems.RenderSystem; | ||
import net.minecraft.client.gui.GuiGraphics; | ||
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.entity.player.Inventory; | ||
|
||
public class CrusherScreen extends AbstractContainerScreen<CrusherMenu> { | ||
|
||
private static final ResourceLocation BACKGROUND_LOCATION = new ResourceLocation(FurenikusRoads.MODID, "textures/gui/machine/crusher.png"); | ||
|
||
public CrusherScreen(CrusherMenu menu, Inventory inventory, Component component) { | ||
super(menu, inventory, component); | ||
|
||
this.titleLabelX = 10; | ||
this.inventoryLabelX = 10; | ||
} | ||
|
||
//TODO move to metro | ||
@Override | ||
public void render(GuiGraphics graphics, int mouseX, int mouseY, float partialTick) { | ||
this.renderBackground(graphics); | ||
super.render(graphics, mouseX, mouseY, partialTick); | ||
|
||
/* | ||
* This method is added by the container screen to render | ||
* the tooltip of the hovered slot. | ||
*/ | ||
this.renderTooltip(graphics, mouseX, mouseY); | ||
} | ||
|
||
//TODO move to metro | ||
@Override | ||
protected void renderBg(GuiGraphics graphics, float partialTick, int mouseX, int mouseY) { | ||
RenderSystem.setShaderTexture(0, BACKGROUND_LOCATION); | ||
|
||
graphics.blit(BACKGROUND_LOCATION, this.leftPos, this.topPos, 0, 0, this.imageWidth, this.imageHeight); | ||
} | ||
|
||
//TODO move to metro | ||
@Override | ||
protected void renderLabels(GuiGraphics graphics, int mouseX, int mouseY) { | ||
super.renderLabels(graphics, mouseX, mouseY); | ||
|
||
// Assume we have some Component 'label' | ||
// 'label' is drawn at 'labelX' and 'labelY' | ||
//graphics.drawString(this.font, this.label, this.labelX, this.labelY, 0x404040); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"block.furenikusroads.road_block_standard_4" : "Road Block Standard (4)", | ||
"block.furenikusroads.road_block_standard_8" : "Road Block Standard (8)", | ||
"block.furenikusroads.road_block_standard_12" : "Road Block Standard (12)", | ||
"block.furenikusroads.road_block_standard_16" : "Road Block Standard (16)", | ||
"block.furenikusroads.road_block_fine_4" : "Road Block Fine (4)", | ||
"block.furenikusroads.road_block_fine_8" : "Road Block Fine (8)", | ||
"block.furenikusroads.road_block_fine_12" : "Road Block Fine (12)", | ||
"block.furenikusroads.road_block_fine_16" : "Road Block Fine (16)", | ||
"block.furenikusroads.road_block_dark_4" : "Road Block Dark (4)", | ||
"block.furenikusroads.road_block_dark_8" : "Road Block Dark (8)", | ||
"block.furenikusroads.road_block_dark_12" : "Road Block Dark (12)", | ||
"block.furenikusroads.road_block_dark_16" : "Road Block Dark (16)", | ||
"block.furenikusroads.road_block_pale_4" : "Road Block Pale (4)", | ||
"block.furenikusroads.road_block_pale_8" : "Road Block Pale (8)", | ||
"block.furenikusroads.road_block_pale_12" : "Road Block Pale (12)", | ||
"block.furenikusroads.road_block_pale_16" : "Road Block Pale (16)", | ||
"block.furenikusroads.road_block_light_4" : "Road Block Light (4)", | ||
"block.furenikusroads.road_block_light_8" : "Road Block Light (8)", | ||
"block.furenikusroads.road_block_light_12" : "Road Block Light (12)", | ||
"block.furenikusroads.road_block_light_16" : "Road Block Light (16)", | ||
"block.furenikusroads.road_block_concrete_1_4" : "Road Block Concrete (4)", | ||
"block.furenikusroads.road_block_concrete_1_8" : "Road Block Concrete (8)", | ||
"block.furenikusroads.road_block_concrete_1_12" : "Road Block Concrete (12)", | ||
"block.furenikusroads.road_block_concrete_1_16" : "Road Block Concrete (16)", | ||
"block.furenikusroads.road_block_concrete_2_4" : "Road Block Concrete (4)", | ||
"block.furenikusroads.road_block_concrete_2_8" : "Road Block Concrete (8)", | ||
"block.furenikusroads.road_block_concrete_2_12" : "Road Block Concrete (12)", | ||
"block.furenikusroads.road_block_concrete_2_16" : "Road Block Concrete (16)", | ||
"block.furenikusroads.road_block_white_4" : "Road Block White (4)", | ||
"block.furenikusroads.road_block_white_8" : "Road Block White (8)", | ||
"block.furenikusroads.road_block_white_12" : "Road Block White (12)", | ||
"block.furenikusroads.road_block_white_16" : "Road Block White (16)", | ||
"block.furenikusroads.stone_road_4" : "Stone Road (4)", | ||
"block.furenikusroads.stone_road_8" : "Stone Road (8)", | ||
"block.furenikusroads.stone_road_12" : "Stone Road (12)", | ||
"block.furenikusroads.stone_road_16" : "Stone Road (16)", | ||
|
||
"block.furenikusroads.sidewalk_4" : "Sidewalk (4)", | ||
"block.furenikusroads.sidewalk_8" : "Sidewalk (8)", | ||
"block.furenikusroads.sidewalk_12" : "Sidewalk (12)", | ||
"block.furenikusroads.sidewalk_16" : "Sidewalk (16)", | ||
"block.furenikusroads.sidewalk_clean_4" : "Sidewalk Clean (4)", | ||
"block.furenikusroads.sidewalk_clean_8" : "Sidewalk Clean(8)", | ||
"block.furenikusroads.sidewalk_clean_12" : "Sidewalk Clean (12)", | ||
"block.furenikusroads.sidewalk_clean_16" : "Sidewalk Clean (16)", | ||
"block.furenikusroads.sidewalk_dark_4" : "Sidewalk Dark (4)", | ||
"block.furenikusroads.sidewalk_dark_8" : "Sidewalk Dark (8)", | ||
"block.furenikusroads.sidewalk_dark_12" : "Sidewalk Dark (12)", | ||
"block.furenikusroads.sidewalk_dark_16" : "Sidewalk Dark (16)", | ||
"block.furenikusroads.sidewalk_tan_4" : "Sidewalk Tan (4)", | ||
"block.furenikusroads.sidewalk_tan_8" : "Sidewalk Tan (8)", | ||
"block.furenikusroads.sidewalk_tan_12" : "Sidewalk Tan (12)", | ||
"block.furenikusroads.sidewalk_tan_16" : "Sidewalk Tan (16)" | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
20 changes: 20 additions & 0 deletions
20
src/main/resources/data/furenikusroads/recipes/road_block_concrete_1_12.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"pattern": | ||
[ | ||
"xx", | ||
"xx" | ||
], | ||
"key": | ||
{ | ||
"x": | ||
{ | ||
"item": "furenikusroads:road_block_concrete_16" | ||
} | ||
}, | ||
"result": | ||
{ | ||
"item": "furenikusroads:road_block_concrete_12", | ||
"count": 4 | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/resources/data/furenikusroads/recipes/road_block_concrete_1_16.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"pattern": | ||
[ | ||
"xxx", | ||
"xax", | ||
"xxx" | ||
], | ||
"key": | ||
{ | ||
"x": | ||
{ | ||
"item": "minecraft:white_concrete" | ||
}, | ||
"a": | ||
{ | ||
"item": "minecraft:stone" | ||
} | ||
}, | ||
"result": | ||
{ | ||
"item": "furenikusroads:road_block_concrete_1_16", | ||
"count": 16 | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/resources/data/furenikusroads/recipes/road_block_concrete_1_16_cycled.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"pattern": | ||
[ | ||
"xx", | ||
"xx" | ||
], | ||
"key": | ||
{ | ||
"x": | ||
{ | ||
"item": "furenikusroads:road_block_concrete_4" | ||
} | ||
}, | ||
"result": | ||
{ | ||
"item": "furenikusroads:road_block_concrete_16", | ||
"count": 4 | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/resources/data/furenikusroads/recipes/road_block_concrete_1_4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"pattern": | ||
[ | ||
"xx", | ||
"xx" | ||
], | ||
"key": | ||
{ | ||
"x": | ||
{ | ||
"item": "furenikusroads:road_block_concrete_8" | ||
} | ||
}, | ||
"result": | ||
{ | ||
"item": "furenikusroads:road_block_concrete_4", | ||
"count": 4 | ||
} | ||
} |
Oops, something went wrong.