-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21ee549
commit 1f93d51
Showing
93 changed files
with
1,202 additions
and
293 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
7 changes: 7 additions & 0 deletions
7
src/generated/resources/assets/minefactorial/blockstates/creative_capacitor.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,7 @@ | ||
{ | ||
"variants": { | ||
"": { | ||
"model": "minefactorial:block/creative_capacitor" | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/generated/resources/assets/minefactorial/blockstates/creative_tank.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,7 @@ | ||
{ | ||
"variants": { | ||
"": { | ||
"model": "minefactorial:block/creative_tank" | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/generated/resources/assets/minefactorial/blockstates/fluid_extractor.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,30 @@ | ||
{ | ||
"variants": { | ||
"facing=down": { | ||
"model": "minefactorial:block/fluid_extractor", | ||
"x": 180 | ||
}, | ||
"facing=east": { | ||
"model": "minefactorial:block/fluid_extractor", | ||
"x": 90, | ||
"y": 90 | ||
}, | ||
"facing=north": { | ||
"model": "minefactorial:block/fluid_extractor", | ||
"x": 90 | ||
}, | ||
"facing=south": { | ||
"model": "minefactorial:block/fluid_extractor", | ||
"x": 90, | ||
"y": 180 | ||
}, | ||
"facing=up": { | ||
"model": "minefactorial:block/fluid_extractor" | ||
}, | ||
"facing=west": { | ||
"model": "minefactorial:block/fluid_extractor", | ||
"x": 90, | ||
"y": 270 | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/generated/resources/assets/minefactorial/blockstates/pump.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,27 @@ | ||
{ | ||
"variants": { | ||
"facing=down": { | ||
"model": "minefactorial:block/pump_down", | ||
"y": 90 | ||
}, | ||
"facing=east": { | ||
"model": "minefactorial:block/pump", | ||
"y": 90 | ||
}, | ||
"facing=north": { | ||
"model": "minefactorial:block/pump" | ||
}, | ||
"facing=south": { | ||
"model": "minefactorial:block/pump", | ||
"y": 180 | ||
}, | ||
"facing=up": { | ||
"model": "minefactorial:block/pump_up", | ||
"y": 90 | ||
}, | ||
"facing=west": { | ||
"model": "minefactorial:block/pump", | ||
"y": 270 | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/minefactorial/models/block/creative_capacitor.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,6 @@ | ||
{ | ||
"parent": "minefactorial:block/template_machine_creative", | ||
"textures": { | ||
"side": "minefactorial:block/machine/creative_capacitor_side" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/minefactorial/models/block/creative_tank.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,6 @@ | ||
{ | ||
"parent": "minefactorial:block/template_machine_creative", | ||
"textures": { | ||
"side": "minefactorial:block/machine/creative_tank_side" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/generated/resources/assets/minefactorial/models/block/pump.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,7 @@ | ||
{ | ||
"parent": "minefactorial:block/template_machine", | ||
"textures": { | ||
"north": "minefactorial:block/fluid_input_side", | ||
"south": "minefactorial:block/fluid_output_side" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/generated/resources/assets/minefactorial/models/block/pump_down.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,7 @@ | ||
{ | ||
"parent": "minefactorial:block/template_machine", | ||
"textures": { | ||
"down": "minefactorial:block/fluid_input_bottom", | ||
"up": "minefactorial:block/fluid_output_top" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/generated/resources/assets/minefactorial/models/block/pump_up.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,7 @@ | ||
{ | ||
"parent": "minefactorial:block/template_machine", | ||
"textures": { | ||
"down": "minefactorial:block/fluid_output_bottom", | ||
"up": "minefactorial:block/fluid_input_top" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/generated/resources/assets/minefactorial/models/item/creative_capacitor.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,3 @@ | ||
{ | ||
"parent": "minefactorial:block/creative_capacitor" | ||
} |
3 changes: 3 additions & 0 deletions
3
src/generated/resources/assets/minefactorial/models/item/creative_tank.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,3 @@ | ||
{ | ||
"parent": "minefactorial:block/creative_tank" | ||
} |
3 changes: 3 additions & 0 deletions
3
src/generated/resources/assets/minefactorial/models/item/fluid_extractor.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,3 @@ | ||
{ | ||
"parent": "minefactorial:block/fluid_extractor" | ||
} |
3 changes: 3 additions & 0 deletions
3
src/generated/resources/assets/minefactorial/models/item/pump.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,3 @@ | ||
{ | ||
"parent": "minefactorial:block/pump" | ||
} |
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
2 changes: 1 addition & 1 deletion
2
src/main/java/martian/minefactorial/client/screen/ScreenBreaker.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
2 changes: 1 addition & 1 deletion
2
src/main/java/martian/minefactorial/client/screen/ScreenCapacitor.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
25 changes: 25 additions & 0 deletions
25
src/main/java/martian/minefactorial/client/screen/ScreenCreativeCapacitor.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,25 @@ | ||
package martian.minefactorial.client.screen; | ||
|
||
import martian.minefactorial.content.block.storage.BlockCapacitorBE; | ||
import martian.minefactorial.content.block.storage.BlockCreativeCapacitorBE; | ||
import martian.minefactorial.content.menu.ContainerCapacitor; | ||
import martian.minefactorial.content.menu.ContainerCreativeCapacitor; | ||
import martian.minefactorial.foundation.client.screen.AbstractEnergyScreen; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.entity.player.Inventory; | ||
|
||
import static martian.minefactorial.Minefactorial.id; | ||
|
||
public class ScreenCreativeCapacitor extends AbstractEnergyScreen<BlockCreativeCapacitorBE, ContainerCreativeCapacitor> { | ||
public static final ResourceLocation UI = id("textures/gui/capacitor.png"); | ||
|
||
public ScreenCreativeCapacitor(ContainerCreativeCapacitor menu, Inventory playerInventory, Component title) { | ||
super(menu, playerInventory, title); | ||
} | ||
|
||
@Override | ||
protected ResourceLocation getUI() { | ||
return UI; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/java/martian/minefactorial/client/screen/ScreenFountain.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
2 changes: 1 addition & 1 deletion
2
src/main/java/martian/minefactorial/client/screen/ScreenMobGrinder.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
62 changes: 62 additions & 0 deletions
62
src/main/java/martian/minefactorial/client/screen/ScreenPump.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,62 @@ | ||
package martian.minefactorial.client.screen; | ||
|
||
import martian.minefactorial.content.block.machinery.BlockPumpBE; | ||
import martian.minefactorial.content.menu.ContainerPump; | ||
import martian.minefactorial.foundation.Mathematics; | ||
import martian.minefactorial.foundation.client.FluidRenderer; | ||
import martian.minefactorial.foundation.client.screen.AbstractMachineScreen; | ||
import net.minecraft.client.gui.GuiGraphics; | ||
import net.minecraft.core.registries.BuiltInRegistries; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.entity.player.Inventory; | ||
import net.neoforged.neoforge.fluids.FluidStack; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import static martian.minefactorial.Minefactorial.id; | ||
|
||
public class ScreenPump extends AbstractMachineScreen<BlockPumpBE, ContainerPump> { | ||
public static final ResourceLocation UI = id("textures/gui/fountain.png"); | ||
|
||
public static final int | ||
TANK_WIDTH = 16, TANK_HEIGHT = 41, | ||
TANK_X = 80, TANK_Y = 36; | ||
|
||
public ScreenPump(ContainerPump menu, Inventory playerInventory, Component title) { | ||
super(menu, playerInventory, title); | ||
} | ||
|
||
@Override | ||
protected ResourceLocation getUI() { | ||
return UI; | ||
} | ||
|
||
@Override | ||
public void renderBg(@NotNull GuiGraphics graphics, float partialTick, int mouseX, int mouseY) { | ||
super.renderBg(graphics, partialTick, mouseX, mouseY); | ||
|
||
if (this.menu.fluidAmount > 0) { | ||
float filled_percent = ((float) this.menu.fluidAmount / this.menu.capacity); | ||
int height = (int) (TANK_HEIGHT * filled_percent); | ||
|
||
FluidRenderer.renderFluidGui( | ||
new FluidStack(BuiltInRegistries.FLUID.byId(this.menu.fluidStackId), this.menu.fluidAmount), | ||
graphics, | ||
leftPos + TANK_X, | ||
topPos + TANK_Y + (TANK_HEIGHT - height), // we do this to render from the bottom to the top | ||
TANK_WIDTH, | ||
height | ||
); | ||
} | ||
} | ||
|
||
@Override | ||
public void render(@NotNull GuiGraphics graphics, int mouseX, int mouseY, float partialTick) { | ||
super.render(graphics, mouseX, mouseY, partialTick); | ||
|
||
if (this.menu.fluidAmount > 0 && Mathematics.pointWithinRectangle(mouseX, mouseY, leftPos + TANK_X, topPos + TANK_Y, TANK_WIDTH, TANK_HEIGHT)) { | ||
FluidStack fluidStack = new FluidStack(BuiltInRegistries.FLUID.byId(this.menu.fluidStackId), this.menu.fluidAmount); | ||
graphics.renderTooltip(this.font, fluidStack.getHoverName().copy().append(": " + this.menu.fluidAmount + "mB"), mouseX, mouseY); | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/java/martian/minefactorial/client/screen/ScreenSteamTurbine.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
Oops, something went wrong.