-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from Trytoon/mybranch/1.20.1
- Loading branch information
Showing
24 changed files
with
553 additions
and
0 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
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
34 changes: 34 additions & 0 deletions
34
src/generated/resources/assets/enderio/blockstates/wired_charger.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,34 @@ | ||
{ | ||
"variants": { | ||
"facing=east,powered=false": { | ||
"model": "enderio:block/wired_charger", | ||
"y": 90 | ||
}, | ||
"facing=east,powered=true": { | ||
"model": "enderio:block/wired_charger_on", | ||
"y": 90 | ||
}, | ||
"facing=north,powered=false": { | ||
"model": "enderio:block/wired_charger" | ||
}, | ||
"facing=north,powered=true": { | ||
"model": "enderio:block/wired_charger_on" | ||
}, | ||
"facing=south,powered=false": { | ||
"model": "enderio:block/wired_charger", | ||
"y": 180 | ||
}, | ||
"facing=south,powered=true": { | ||
"model": "enderio:block/wired_charger_on", | ||
"y": 180 | ||
}, | ||
"facing=west,powered=false": { | ||
"model": "enderio:block/wired_charger", | ||
"y": 270 | ||
}, | ||
"facing=west,powered=true": { | ||
"model": "enderio:block/wired_charger_on", | ||
"y": 270 | ||
} | ||
} | ||
} |
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
23 changes: 23 additions & 0 deletions
23
src/generated/resources/assets/enderio/models/block/wired_charger.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,23 @@ | ||
{ | ||
"parent": "minecraft:block/block", | ||
"children": { | ||
"frame": { | ||
"parent": "enderio:block/machine_frame" | ||
}, | ||
"front": { | ||
"parent": "enderio:block/wired_charger_front" | ||
}, | ||
"overlay": { | ||
"parent": "enderio:block/io_overlay" | ||
} | ||
}, | ||
"item_render_order": [ | ||
"frame", | ||
"overlay", | ||
"front" | ||
], | ||
"loader": "forge:composite", | ||
"textures": { | ||
"particle": "enderio:block/machine_side" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/enderio/models/block/wired_charger_front_on.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": "enderio:block/wired_charger_front", | ||
"textures": { | ||
"front": "enderio:block/wired_charger_front" | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/generated/resources/assets/enderio/models/block/wired_charger_on.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,26 @@ | ||
{ | ||
"parent": "minecraft:block/block", | ||
"children": { | ||
"frame": { | ||
"parent": "enderio:block/machine_frame" | ||
}, | ||
"front": { | ||
"parent": "enderio:block/wired_charger_front", | ||
"textures": { | ||
"front": "enderio:block/wired_charger_front_on" | ||
} | ||
}, | ||
"overlay": { | ||
"parent": "enderio:block/io_overlay" | ||
} | ||
}, | ||
"item_render_order": [ | ||
"frame", | ||
"overlay", | ||
"front" | ||
], | ||
"loader": "forge:composite", | ||
"textures": { | ||
"particle": "enderio:block/machine_side" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/generated/resources/assets/enderio/models/item/wired_charger.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": "enderio:block/wired_charger" | ||
} |
35 changes: 35 additions & 0 deletions
35
src/generated/resources/data/enderio/advancements/recipes/misc/wired_charger.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,35 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_ingredient": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": [ | ||
"enderio:void_chassis" | ||
] | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
}, | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "enderio:wired_charger" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_ingredient", | ||
"has_the_recipe" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"enderio:wired_charger" | ||
] | ||
}, | ||
"sends_telemetry_event": false | ||
} |
29 changes: 29 additions & 0 deletions
29
src/generated/resources/data/enderio/loot_tables/blocks/wired_charger.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,29 @@ | ||
{ | ||
"type": "minecraft:block", | ||
"pools": [ | ||
{ | ||
"bonus_rolls": 0.0, | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"functions": [ | ||
{ | ||
"function": "minecraft:copy_nbt", | ||
"ops": [ | ||
{ | ||
"op": "replace", | ||
"source": "", | ||
"target": "BlockEntityTag" | ||
} | ||
], | ||
"source": "block_entity" | ||
} | ||
], | ||
"name": "enderio:wired_charger" | ||
} | ||
], | ||
"rolls": 1.0 | ||
} | ||
], | ||
"random_sequence": "enderio:blocks/wired_charger" | ||
} |
21 changes: 21 additions & 0 deletions
21
src/generated/resources/data/enderio/recipes/wired_charger.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,21 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"category": "misc", | ||
"key": { | ||
"C": { | ||
"item": "enderio:copper_alloy_ingot" | ||
}, | ||
"V": { | ||
"item": "enderio:void_chassis" | ||
} | ||
}, | ||
"pattern": [ | ||
"CCC", | ||
"CVC", | ||
"CCC" | ||
], | ||
"result": { | ||
"item": "enderio:wired_charger" | ||
}, | ||
"show_notification": true | ||
} |
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
48 changes: 48 additions & 0 deletions
48
src/machines/java/com/enderio/machines/client/gui/screen/WiredChargerScreen.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,48 @@ | ||
package com.enderio.machines.client.gui.screen; | ||
|
||
import com.enderio.EnderIO; | ||
import com.enderio.api.misc.Vector2i; | ||
import com.enderio.base.common.lang.EIOLang; | ||
import com.enderio.core.client.gui.screen.EIOScreen; | ||
import com.enderio.core.client.gui.widgets.EnumIconWidget; | ||
import com.enderio.machines.client.gui.widget.CapacitorEnergyWidget; | ||
import com.enderio.machines.client.gui.widget.EnergyWidget; | ||
import com.enderio.machines.client.gui.widget.ProgressWidget; | ||
import com.enderio.machines.client.gui.widget.ioconfig.IOConfigButton; | ||
import com.enderio.machines.common.menu.WiredChargerMenu; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.entity.player.Inventory; | ||
|
||
public class WiredChargerScreen extends EIOScreen<WiredChargerMenu> { | ||
|
||
private static final ResourceLocation BG_TEXTURE = EnderIO.loc("textures/gui/wired_charger.png"); | ||
public WiredChargerScreen(WiredChargerMenu pMenu, Inventory pPlayerInventory, Component pTitle) { | ||
super(pMenu, pPlayerInventory, pTitle); | ||
} | ||
|
||
@Override | ||
protected void init() { | ||
super.init(); | ||
|
||
addRenderableOnly(new ProgressWidget.BottomUp(this, () -> menu.getBlockEntity().getProgress(), getGuiLeft() + 103, getGuiTop() + 18, 12, 36, 242, 1)); | ||
|
||
addRenderableOnly(new CapacitorEnergyWidget(this, getMenu().getBlockEntity()::getEnergyStorage, menu.getBlockEntity()::isCapacitorInstalled, 37 + leftPos, 14 + topPos, 9, 42)); | ||
|
||
addRenderableWidget(new EnumIconWidget<>(this, leftPos + imageWidth - 8 - 12, topPos + 6, () -> menu.getBlockEntity().getRedstoneControl(), | ||
control -> menu.getBlockEntity().setRedstoneControl(control), EIOLang.REDSTONE_MODE)); | ||
|
||
var inset = new IOConfigButton.Inset(21,0, 0, 0); | ||
addRenderableWidget(new IOConfigButton<>(this, leftPos + imageWidth - 6 - 16, topPos + 22, 16, 16, menu, this::addRenderableWidget, font, inset)); | ||
} | ||
|
||
@Override | ||
public ResourceLocation getBackgroundImage() { | ||
return BG_TEXTURE; | ||
} | ||
|
||
@Override | ||
protected Vector2i getBackgroundImageSize() { | ||
return new Vector2i(197, 166); | ||
} | ||
} |
Oops, something went wrong.