It does a thing
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -30,3 +30,5 @@ bin/
|
||||
|
||||
run/
|
||||
run-data/
|
||||
|
||||
.cache
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/ev_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/ev_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/ev_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/ev_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/ev_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/ev_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/hv_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/hv_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/hv_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/hv_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/hv_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/hv_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/iv_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/iv_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/iv_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/iv_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/iv_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/iv_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/luv_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/luv_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/luv_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/luv_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/luv_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/luv_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/lv_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/lv_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/lv_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/lv_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/lv_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/lv_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/max_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/max_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/max_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/max_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/max_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/max_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/mv_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/mv_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/mv_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/mv_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/mv_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/mv_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/opv_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/opv_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/opv_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/opv_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/opv_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/opv_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/uev_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/uev_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/uev_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/uev_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/uev_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/uev_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/uhv_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/uhv_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/uhv_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/uhv_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/uhv_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/uhv_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/uiv_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/uiv_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/uiv_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/uiv_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/uiv_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/uiv_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/ulv_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/ulv_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/ulv_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/ulv_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/ulv_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/ulv_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/uv_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/uv_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/uv_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/uv_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/uv_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/uv_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/uxv_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/uxv_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/uxv_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/uxv_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/uxv_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/uxv_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "kineticbridge:block/machine/zpm_kinetic_output_hatch",
|
||||
"x": 90
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "kineticbridge:block/machine/zpm_kinetic_output_hatch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "kineticbridge:block/machine/zpm_kinetic_output_hatch"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "kineticbridge:block/machine/zpm_kinetic_output_hatch",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"gtceu:z": 180,
|
||||
"model": "kineticbridge:block/machine/zpm_kinetic_output_hatch",
|
||||
"x": 270
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "kineticbridge:block/machine/zpm_kinetic_output_hatch",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
22
src/generated/resources/assets/kineticbridge/lang/en_ud.json
Normal file
22
src/generated/resources/assets/kineticbridge/lang/en_ud.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"block.kineticbridge.ev_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ ΛƎϛ§",
|
||||
"block.kineticbridge.hv_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ ΛH9§",
|
||||
"block.kineticbridge.iv_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ ΛI6§",
|
||||
"block.kineticbridge.luv_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ ΛnꞀp§",
|
||||
"block.kineticbridge.lv_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ ΛꞀㄥ§",
|
||||
"block.kineticbridge.max_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ XⱯWן§ɔ§",
|
||||
"block.kineticbridge.mv_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ ΛWq§",
|
||||
"block.kineticbridge.opv_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ ΛdOן§6§",
|
||||
"block.kineticbridge.uev_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ ΛƎ∩ɐ§",
|
||||
"block.kineticbridge.uhv_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ ΛH∩ㄣ§",
|
||||
"block.kineticbridge.uiv_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ ΛI∩ᄅ§",
|
||||
"block.kineticbridge.ulv_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ ΛꞀ∩8§",
|
||||
"block.kineticbridge.uv_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ Λ∩Ɛ§",
|
||||
"block.kineticbridge.uxv_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ ΛX∩ǝ§",
|
||||
"block.kineticbridge.zpm_kinetic_output_hatch": "ɥɔʇɐH ʇndʇnO ɔıʇǝuıʞ WԀZɔ§",
|
||||
"kineticbridge.tooltip.capacity": ")ʇ/∩Ǝ %s~( ∩S %s oʇ dn sǝpıʌoɹԀ",
|
||||
"kineticbridge.tooltip.rpm": "WԀᴚ %s ʇɐ uoıʇɐʇoɹ ǝʇɐǝɹƆ sʇndʇnO",
|
||||
"tooltip.kineticbridge.last_tick_power": "∩Ǝ %s :ʍɐɹᗡ ʞɔı⟘ ʇsɐꞀ",
|
||||
"tooltip.kineticbridge.max_power": "ʇ/∩Ǝ %s :ʇndʇnO xɐW",
|
||||
"tooltip.kineticbridge.max_stress": "WԀᴚ %s @ ∩S %s :ʎʇıɔɐdɐƆ ǝʌıʇɔⱯ"
|
||||
}
|
||||
22
src/generated/resources/assets/kineticbridge/lang/en_us.json
Normal file
22
src/generated/resources/assets/kineticbridge/lang/en_us.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"block.kineticbridge.ev_kinetic_output_hatch": "§5EV Kinetic Output Hatch",
|
||||
"block.kineticbridge.hv_kinetic_output_hatch": "§6HV Kinetic Output Hatch",
|
||||
"block.kineticbridge.iv_kinetic_output_hatch": "§9IV Kinetic Output Hatch",
|
||||
"block.kineticbridge.luv_kinetic_output_hatch": "§dLuV Kinetic Output Hatch",
|
||||
"block.kineticbridge.lv_kinetic_output_hatch": "§7LV Kinetic Output Hatch",
|
||||
"block.kineticbridge.max_kinetic_output_hatch": "§c§lMAX Kinetic Output Hatch",
|
||||
"block.kineticbridge.mv_kinetic_output_hatch": "§bMV Kinetic Output Hatch",
|
||||
"block.kineticbridge.opv_kinetic_output_hatch": "§9§lOpV Kinetic Output Hatch",
|
||||
"block.kineticbridge.uev_kinetic_output_hatch": "§aUEV Kinetic Output Hatch",
|
||||
"block.kineticbridge.uhv_kinetic_output_hatch": "§4UHV Kinetic Output Hatch",
|
||||
"block.kineticbridge.uiv_kinetic_output_hatch": "§2UIV Kinetic Output Hatch",
|
||||
"block.kineticbridge.ulv_kinetic_output_hatch": "§8ULV Kinetic Output Hatch",
|
||||
"block.kineticbridge.uv_kinetic_output_hatch": "§3UV Kinetic Output Hatch",
|
||||
"block.kineticbridge.uxv_kinetic_output_hatch": "§eUXV Kinetic Output Hatch",
|
||||
"block.kineticbridge.zpm_kinetic_output_hatch": "§cZPM Kinetic Output Hatch",
|
||||
"kineticbridge.tooltip.capacity": "Provides up to %s SU (~%s EU/t)",
|
||||
"kineticbridge.tooltip.rpm": "Outputs Create rotation at %s RPM",
|
||||
"tooltip.kineticbridge.last_tick_power": "Last Tick Draw: %s EU",
|
||||
"tooltip.kineticbridge.max_power": "Max Output: %s EU/t",
|
||||
"tooltip.kineticbridge.max_stress": "Active Capacity: %s SU @ %s RPM"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:ev_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/ev/bottom",
|
||||
"side": "gtceu:block/casings/voltage/ev/side",
|
||||
"top": "gtceu:block/casings/voltage/ev/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:hv_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/hv/bottom",
|
||||
"side": "gtceu:block/casings/voltage/hv/side",
|
||||
"top": "gtceu:block/casings/voltage/hv/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:iv_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/iv/bottom",
|
||||
"side": "gtceu:block/casings/voltage/iv/side",
|
||||
"top": "gtceu:block/casings/voltage/iv/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:luv_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/luv/bottom",
|
||||
"side": "gtceu:block/casings/voltage/luv/side",
|
||||
"top": "gtceu:block/casings/voltage/luv/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:lv_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/lv/bottom",
|
||||
"side": "gtceu:block/casings/voltage/lv/side",
|
||||
"top": "gtceu:block/casings/voltage/lv/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:max_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/max/bottom",
|
||||
"side": "gtceu:block/casings/voltage/max/side",
|
||||
"top": "gtceu:block/casings/voltage/max/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:mv_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/mv/bottom",
|
||||
"side": "gtceu:block/casings/voltage/mv/side",
|
||||
"top": "gtceu:block/casings/voltage/mv/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:opv_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/opv/bottom",
|
||||
"side": "gtceu:block/casings/voltage/opv/side",
|
||||
"top": "gtceu:block/casings/voltage/opv/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:uev_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/uev/bottom",
|
||||
"side": "gtceu:block/casings/voltage/uev/side",
|
||||
"top": "gtceu:block/casings/voltage/uev/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:uhv_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/uhv/bottom",
|
||||
"side": "gtceu:block/casings/voltage/uhv/side",
|
||||
"top": "gtceu:block/casings/voltage/uhv/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:uiv_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/uiv/bottom",
|
||||
"side": "gtceu:block/casings/voltage/uiv/side",
|
||||
"top": "gtceu:block/casings/voltage/uiv/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:ulv_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/ulv/bottom",
|
||||
"side": "gtceu:block/casings/voltage/ulv/side",
|
||||
"top": "gtceu:block/casings/voltage/ulv/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:uv_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/uv/bottom",
|
||||
"side": "gtceu:block/casings/voltage/uv/side",
|
||||
"top": "gtceu:block/casings/voltage/uv/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:uxv_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/uxv/bottom",
|
||||
"side": "gtceu:block/casings/voltage/uxv/side",
|
||||
"top": "gtceu:block/casings/voltage/uxv/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"loader": "gtceu:machine",
|
||||
"machine": "kineticbridge:zpm_kinetic_output_hatch",
|
||||
"replaceable_textures": [
|
||||
"bottom",
|
||||
"top",
|
||||
"side"
|
||||
],
|
||||
"variants": {
|
||||
"": {
|
||||
"model": {
|
||||
"parent": "kineticbridge:block/machine/part/kinetic_output_hatch_overlay",
|
||||
"textures": {
|
||||
"bottom": "gtceu:block/casings/voltage/zpm/bottom",
|
||||
"side": "gtceu:block/casings/voltage/zpm/side",
|
||||
"top": "gtceu:block/casings/voltage/zpm/top"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/ev_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/hv_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/iv_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/luv_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/lv_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/max_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/mv_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/opv_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/uev_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/uhv_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/uiv_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/ulv_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/uv_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/uxv_kinetic_output_hatch"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "kineticbridge:block/machine/zpm_kinetic_output_hatch"
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.imbgt.kineticbridge;
|
||||
|
||||
import com.gregtechceu.gtceu.api.GTValues;
|
||||
import com.gregtechceu.gtceu.api.block.IMachineBlock;
|
||||
import com.gregtechceu.gtceu.api.data.RotationState;
|
||||
import com.gregtechceu.gtceu.api.item.MetaMachineItem;
|
||||
import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity;
|
||||
import com.gregtechceu.gtceu.api.machine.MachineDefinition;
|
||||
import com.gregtechceu.gtceu.api.machine.MetaMachine;
|
||||
@@ -11,7 +13,10 @@ import com.gregtechceu.gtceu.common.machine.multiblock.part.EnergyHatchPartMachi
|
||||
import com.gregtechceu.gtceu.utils.FormattingUtil;
|
||||
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.Item;
|
||||
|
||||
import com.imbgt.kineticbridge.block.KineticOutputHatchBlock;
|
||||
import com.imbgt.kineticbridge.blockentity.KineticOutputHatchBlockEntity;
|
||||
import com.imbgt.kineticbridge.machine.KineticOutputHatchPartMachine;
|
||||
|
||||
import java.util.Locale;
|
||||
@@ -21,9 +26,11 @@ public final class KineticBridgeMachines {
|
||||
|
||||
private KineticBridgeMachines() {}
|
||||
|
||||
private static final int OUTPUT_AMPERAGE = 2;
|
||||
|
||||
public static final MachineDefinition[] KINETIC_OUTPUT_HATCH = registerTieredMachines(
|
||||
"kinetic_output_hatch",
|
||||
(holder, tier) -> new KineticOutputHatchPartMachine(holder, tier, 2),
|
||||
(holder, tier) -> new KineticOutputHatchPartMachine(holder, tier, OUTPUT_AMPERAGE),
|
||||
(tier, builder) -> builder
|
||||
.langValue(GTValues.VNF[tier] + " Kinetic Output Hatch")
|
||||
.rotationState(RotationState.ALL)
|
||||
@@ -31,12 +38,19 @@ public final class KineticBridgeMachines {
|
||||
.tooltips(
|
||||
Component.translatable("gtceu.universal.tooltip.voltage_out",
|
||||
FormattingUtil.formatNumbers(GTValues.V[tier]), GTValues.VNF[tier]),
|
||||
Component.translatable("gtceu.universal.tooltip.amperage_out", 2),
|
||||
Component.translatable("gtceu.universal.tooltip.amperage_out", OUTPUT_AMPERAGE),
|
||||
Component.translatable("gtceu.universal.tooltip.energy_storage_capacity",
|
||||
FormattingUtil
|
||||
.formatNumbers(EnergyHatchPartMachine.getHatchEnergyCapacity(tier, 2))),
|
||||
Component.translatable("gtceu.machine.energy_hatch.output.tooltip"))
|
||||
.overlayTieredHullModel("energy_output_hatch")
|
||||
FormattingUtil.formatNumbers(
|
||||
EnergyHatchPartMachine.getHatchEnergyCapacity(tier, OUTPUT_AMPERAGE))),
|
||||
Component.translatable("gtceu.machine.energy_hatch.output.tooltip"),
|
||||
Component.translatable("kineticbridge.tooltip.rpm",
|
||||
FormattingUtil.formatNumbers(KineticOutputHatchPartMachine.TARGET_RPM)),
|
||||
Component.translatable("kineticbridge.tooltip.capacity",
|
||||
FormattingUtil.formatNumbers(
|
||||
GTValues.V[tier] * OUTPUT_AMPERAGE /
|
||||
KineticOutputHatchPartMachine.TARGET_RPM),
|
||||
FormattingUtil.formatNumbers(GTValues.V[tier] * OUTPUT_AMPERAGE)))
|
||||
.overlayTieredHullModel(KineticBridge.id("block/machine/part/kinetic_output_hatch_overlay"))
|
||||
.register(),
|
||||
GTValues.ALL_TIERS);
|
||||
|
||||
@@ -49,7 +63,11 @@ public final class KineticBridgeMachines {
|
||||
for (int tier : tiers) {
|
||||
var register = KineticBridge.REGISTRATE.machine(
|
||||
GTValues.VN[tier].toLowerCase(Locale.ROOT) + "_" + name,
|
||||
holder -> factory.apply(holder, tier))
|
||||
MachineDefinition::new,
|
||||
holder -> factory.apply(holder, tier),
|
||||
KineticOutputHatchBlock::new,
|
||||
(IMachineBlock block, Item.Properties properties) -> new MetaMachineItem(block, properties),
|
||||
KineticOutputHatchBlockEntity::new)
|
||||
.tier(tier);
|
||||
definitions[tier] = builder.apply(tier, register);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.imbgt.kineticbridge.block;
|
||||
|
||||
import com.gregtechceu.gtceu.api.block.MetaMachineBlock;
|
||||
import com.gregtechceu.gtceu.api.data.RotationState;
|
||||
import com.gregtechceu.gtceu.api.machine.MachineDefinition;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityTicker;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import com.imbgt.kineticbridge.blockentity.KineticOutputHatchBlockEntity;
|
||||
import com.simibubi.create.content.kinetics.base.IRotate;
|
||||
|
||||
/**
|
||||
* Machine block wrapper that exposes a Create shaft interface while still
|
||||
* delegating placement and state management to the GT machine definition.
|
||||
*/
|
||||
public class KineticOutputHatchBlock extends MetaMachineBlock implements IRotate {
|
||||
|
||||
public KineticOutputHatchBlock(Properties properties, MachineDefinition definition) {
|
||||
super(properties, definition);
|
||||
}
|
||||
|
||||
private Direction resolveFacing(BlockState state) {
|
||||
RotationState rotationState = getDefinition().getRotationState();
|
||||
if (rotationState == RotationState.NONE) {
|
||||
return Direction.NORTH;
|
||||
}
|
||||
return state.getValue(rotationState.property);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasShaftTowards(LevelReader world, BlockPos pos, BlockState state, Direction face) {
|
||||
return face == resolveFacing(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Direction.Axis getRotationAxis(BlockState state) {
|
||||
return resolveFacing(state).getAxis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState state,
|
||||
BlockEntityType<T> type) {
|
||||
if (type != getDefinition().getBlockEntityType()) {
|
||||
return null;
|
||||
}
|
||||
return (lvl, pos, blockState, blockEntity) -> {
|
||||
if (blockEntity instanceof KineticOutputHatchBlockEntity hatch) {
|
||||
hatch.tick();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,373 @@
|
||||
package com.imbgt.kineticbridge.blockentity;
|
||||
|
||||
import com.gregtechceu.gtceu.api.GTValues;
|
||||
import com.gregtechceu.gtceu.api.blockentity.MetaMachineBlockEntity;
|
||||
import com.gregtechceu.gtceu.api.capability.ITurbineMachine;
|
||||
import com.gregtechceu.gtceu.api.capability.compat.FeCompat;
|
||||
import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity;
|
||||
import com.gregtechceu.gtceu.api.machine.MachineDefinition;
|
||||
import com.gregtechceu.gtceu.api.machine.MetaMachine;
|
||||
import com.gregtechceu.gtceu.api.machine.trait.NotifiableEnergyContainer;
|
||||
import com.gregtechceu.gtceu.client.model.machine.MachineRenderState;
|
||||
import com.gregtechceu.gtceu.common.datafixers.TagFixer;
|
||||
import com.gregtechceu.gtceu.utils.FormattingUtil;
|
||||
|
||||
import com.lowdragmc.lowdraglib.syncdata.IManaged;
|
||||
import com.lowdragmc.lowdraglib.syncdata.field.FieldManagedStorage;
|
||||
import com.lowdragmc.lowdraglib.syncdata.field.ManagedFieldHolder;
|
||||
import com.lowdragmc.lowdraglib.syncdata.managed.MultiManagedStorage;
|
||||
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
|
||||
import com.imbgt.kineticbridge.machine.KineticOutputHatchPartMachine;
|
||||
import com.simibubi.create.content.kinetics.base.GeneratingKineticBlockEntity;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Block entity that bridges a GTCEu meta machine with Create's kinetic network.
|
||||
*/
|
||||
public class KineticOutputHatchBlockEntity extends GeneratingKineticBlockEntity
|
||||
implements IMachineBlockEntity, IManaged {
|
||||
|
||||
private static final ManagedFieldHolder MANAGED_FIELD_HOLDER = new ManagedFieldHolder(
|
||||
KineticOutputHatchBlockEntity.class);
|
||||
private static final float CREATE_MAX_RPM = KineticOutputHatchPartMachine.TARGET_RPM;
|
||||
private static final float TURBINE_REFERENCE_RPM = 7000.0f;
|
||||
private static final float MIN_GENERATED_RPM = 1.0f;
|
||||
// FE generated per stress unit per RPM tick, aligned with Create: New Age defaults
|
||||
private static final double SU_TO_FE_ENERGY = 15.0d / 512.0d;
|
||||
private static final float EPSILON = 1.0e-4f;
|
||||
|
||||
private final MultiManagedStorage managedStorage = new MultiManagedStorage();
|
||||
private final FieldManagedStorage syncStorage = new FieldManagedStorage(this);
|
||||
private final MetaMachine metaMachine;
|
||||
private MachineRenderState renderState;
|
||||
private final long offset = GTValues.RNG.nextInt(20);
|
||||
|
||||
private float advertisedCapacity = 0.0f;
|
||||
private float generatedSpeed = 0.0f;
|
||||
private long lastTickPower = 0L;
|
||||
private boolean metaUnloaded = false;
|
||||
|
||||
public KineticOutputHatchBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState blockState) {
|
||||
super(type, pos, blockState);
|
||||
MachineDefinition definition = getDefinition();
|
||||
this.renderState = definition.defaultRenderState();
|
||||
this.metaMachine = definition.createMetaMachine(this);
|
||||
this.getRootStorage().attach(getSyncStorage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (level == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (level.isClientSide()) {
|
||||
metaMachine.clientTick();
|
||||
return;
|
||||
}
|
||||
|
||||
var machine = getMetaMachine();
|
||||
if (!(machine instanceof KineticOutputHatchPartMachine hatch)) {
|
||||
updateKinetics(0.0f, 0.0f, 0L);
|
||||
metaMachine.serverTick();
|
||||
return;
|
||||
}
|
||||
|
||||
ITurbineMachine turbine = null;
|
||||
for (var controller : hatch.getControllers()) {
|
||||
if (controller instanceof ITurbineMachine tm) {
|
||||
turbine = tm;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int rotorSpeed = turbine != null ? Math.max(0, turbine.getRotorSpeed()) : hatch.getRotorSpeed();
|
||||
int maxRotorSpeed = turbine != null ? Math.max(1, turbine.getMaxRotorHolderSpeed()) : hatch.getMaxRotorSpeed();
|
||||
float rpmScale = 0.0f;
|
||||
if (rotorSpeed > 0) {
|
||||
rpmScale = Math.min(1.0f, Math.max(0.0f, rotorSpeed / TURBINE_REFERENCE_RPM));
|
||||
}
|
||||
hatch.updateRotorTelemetry(rotorSpeed, maxRotorSpeed);
|
||||
|
||||
NotifiableEnergyContainer container = hatch.getEnergyContainer();
|
||||
long voltage = container.getOutputVoltage();
|
||||
long amperage = container.getOutputAmperage();
|
||||
long theoreticalPower = Math.max(0L, voltage * amperage);
|
||||
|
||||
if (theoreticalPower <= 0 || rpmScale <= 0.0f) {
|
||||
updateKinetics(0.0f, 0.0f, 0L);
|
||||
metaMachine.serverTick();
|
||||
return;
|
||||
}
|
||||
|
||||
float previousCapacity = advertisedCapacity;
|
||||
float previousSpeed = generatedSpeed;
|
||||
|
||||
float nextSpeed = CREATE_MAX_RPM * rpmScale;
|
||||
if (nextSpeed > 0.0f && nextSpeed < MIN_GENERATED_RPM) {
|
||||
nextSpeed = MIN_GENERATED_RPM;
|
||||
}
|
||||
|
||||
double speedFraction = Math.min(1.0d, nextSpeed / CREATE_MAX_RPM);
|
||||
int euToFeRatio = Math.max(1, FeCompat.ratio(false));
|
||||
double theoreticalEuAtSpeed = theoreticalPower * speedFraction;
|
||||
double theoreticalFeAtSpeed = theoreticalEuAtSpeed * euToFeRatio;
|
||||
double absSpeed = Math.max(MIN_GENERATED_RPM, Math.abs(nextSpeed));
|
||||
double theoreticalStressCapacity = absSpeed > 0.0d ?
|
||||
theoreticalFeAtSpeed / (absSpeed * SU_TO_FE_ENERGY) : 0.0d;
|
||||
double theoreticalStress = theoreticalStressCapacity * absSpeed;
|
||||
|
||||
double networkStress = Math.max(0.0d, this.stress);
|
||||
double networkCapacity = Math.max(0.0d, this.capacity);
|
||||
|
||||
double requestedStress = theoreticalStress;
|
||||
if (networkCapacity > 0.0d) {
|
||||
double shareRatio = theoreticalStress / networkCapacity;
|
||||
requestedStress = Math.min(theoreticalStress, networkStress * shareRatio);
|
||||
} else if (networkStress <= 0.0d) {
|
||||
requestedStress = 0.0d;
|
||||
}
|
||||
|
||||
double requestedFe = requestedStress * SU_TO_FE_ENERGY;
|
||||
double requestedEu = requestedFe / euToFeRatio;
|
||||
|
||||
double targetEu = Math.min(theoreticalEuAtSpeed, requestedEu);
|
||||
long stored = container.getEnergyStored();
|
||||
long maxAvailable = Math.min(stored, theoreticalPower);
|
||||
if (maxAvailable > 0) {
|
||||
targetEu = Math.min(targetEu, maxAvailable);
|
||||
}
|
||||
|
||||
long energyBudget = 0L;
|
||||
if (targetEu > 0.0d) {
|
||||
energyBudget = Math.max(1L, (long) Math.ceil(targetEu));
|
||||
if (maxAvailable > 0) {
|
||||
energyBudget = Math.min(energyBudget, maxAvailable);
|
||||
}
|
||||
}
|
||||
|
||||
long drained = energyBudget > 0 ? container.removeEnergy(energyBudget) : 0L;
|
||||
|
||||
double advertised = theoreticalStressCapacity;
|
||||
if (energyBudget > drained && requestedStress > 0.0d) {
|
||||
double drainedFe = FeCompat.toFeLong(drained, euToFeRatio);
|
||||
double actualCapacity = drainedFe / (absSpeed * absSpeed * SU_TO_FE_ENERGY);
|
||||
advertised = Math.min(theoreticalStressCapacity, actualCapacity);
|
||||
}
|
||||
|
||||
float nextCapacity = (float) Math.max(0.0d, advertised);
|
||||
|
||||
updateKinetics(nextSpeed, nextCapacity, drained);
|
||||
|
||||
boolean speedChanged = Math.abs(previousSpeed - generatedSpeed) > EPSILON;
|
||||
boolean capacityChanged = Math.abs(previousCapacity - advertisedCapacity) > EPSILON;
|
||||
|
||||
if (speedChanged) {
|
||||
updateGeneratedRotation();
|
||||
} else if (capacityChanged && hasNetwork()) {
|
||||
notifyStressCapacityChange(advertisedCapacity);
|
||||
getOrCreateNetwork().updateStressFor(this, calculateStressApplied());
|
||||
getOrCreateNetwork().updateStress();
|
||||
sendData();
|
||||
}
|
||||
|
||||
metaMachine.serverTick();
|
||||
}
|
||||
|
||||
private void updateKinetics(float speed, float capacityPerSpeed, long drainedPower) {
|
||||
this.generatedSpeed = speed;
|
||||
this.advertisedCapacity = capacityPerSpeed;
|
||||
this.lastTickPower = drainedPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float calculateStressApplied() {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float calculateAddedStressCapacity() {
|
||||
return advertisedCapacity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getGeneratedSpeed() {
|
||||
return generatedSpeed;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag tag, boolean clientPacket) {
|
||||
if (!clientPacket) {
|
||||
TagFixer.fixFluidTags(tag);
|
||||
}
|
||||
super.read(tag, clientPacket);
|
||||
this.generatedSpeed = tag.getFloat("GeneratedSpeed");
|
||||
this.advertisedCapacity = tag.getFloat("StressCapacity");
|
||||
this.lastTickPower = tag.getLong("LastPower");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void write(CompoundTag tag, boolean clientPacket) {
|
||||
super.write(tag, clientPacket);
|
||||
tag.putFloat("GeneratedSpeed", generatedSpeed);
|
||||
tag.putFloat("StressCapacity", advertisedCapacity);
|
||||
tag.putLong("LastPower", lastTickPower);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
boolean added = super.addToGoggleTooltip(tooltip, isPlayerSneaking);
|
||||
MetaMachine machine = getMetaMachine();
|
||||
if (machine instanceof KineticOutputHatchPartMachine hatch) {
|
||||
NotifiableEnergyContainer container = hatch.getEnergyContainer();
|
||||
long maxPower = container.getOutputVoltage() * container.getOutputAmperage();
|
||||
tooltip.add(Component.translatable("tooltip.kineticbridge.max_power",
|
||||
Component.literal(FormattingUtil.formatNumbers(maxPower))
|
||||
.withStyle(ChatFormatting.AQUA)));
|
||||
tooltip.add(Component.translatable("tooltip.kineticbridge.max_stress",
|
||||
Component.literal(FormattingUtil.formatNumbers(Math.max(0.0f, advertisedCapacity)))
|
||||
.withStyle(ChatFormatting.AQUA),
|
||||
Component.literal(String.format("%.0f", (double) CREATE_MAX_RPM))
|
||||
.withStyle(ChatFormatting.AQUA)));
|
||||
tooltip.add(Component.translatable("tooltip.kineticbridge.last_tick_power",
|
||||
Component.literal(FormattingUtil.formatNumbers(lastTickPower)).withStyle(ChatFormatting.AQUA)));
|
||||
return true;
|
||||
}
|
||||
return added;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MultiManagedStorage getRootStorage() {
|
||||
return managedStorage;
|
||||
}
|
||||
|
||||
public FieldManagedStorage getSyncStorage() {
|
||||
return syncStorage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManagedFieldHolder getFieldHolder() {
|
||||
return MANAGED_FIELD_HOLDER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MachineRenderState getRenderState() {
|
||||
return renderState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRenderState(MachineRenderState state) {
|
||||
this.renderState = state;
|
||||
scheduleRenderUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetaMachine getMetaMachine() {
|
||||
return metaMachine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
super.onLoad();
|
||||
metaMachine.onLoad();
|
||||
}
|
||||
|
||||
private void unloadMetaMachine() {
|
||||
if (!metaUnloaded) {
|
||||
metaUnloaded = true;
|
||||
metaMachine.onUnload();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
unloadMetaMachine();
|
||||
super.remove();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
unloadMetaMachine();
|
||||
super.invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRenderGrid(Player player, BlockPos pos, BlockState state, ItemStack held,
|
||||
Set<com.gregtechceu.gtceu.api.item.tool.GTToolType> toolTypes) {
|
||||
return metaMachine.shouldRenderGrid(player, pos, state, held, toolTypes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable com.lowdragmc.lowdraglib.gui.texture.ResourceTexture sideTips(Player player, BlockPos pos,
|
||||
BlockState state,
|
||||
Set<com.gregtechceu.gtceu.api.item.tool.GTToolType> toolTypes,
|
||||
Direction side) {
|
||||
return metaMachine.sideTips(player, pos, state, toolTypes, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull <T> LazyOptional<T> getCapability(@NotNull Capability<T> cap, @Nullable Direction side) {
|
||||
var result = MetaMachineBlockEntity.getCapability(metaMachine, cap, side);
|
||||
if (result.isPresent()) {
|
||||
return result;
|
||||
}
|
||||
return super.getCapability(cap, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setChanged() {
|
||||
if (level != null) {
|
||||
level.blockEntityChanged(worldPosition);
|
||||
}
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Override
|
||||
public AABB getRenderBoundingBox() {
|
||||
return super.getRenderBoundingBox().inflate(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChanged() {
|
||||
var lvl = getLevel();
|
||||
if (lvl != null && !lvl.isClientSide && lvl.getServer() != null) {
|
||||
lvl.getServer().execute(this::setChanged);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean triggerEvent(int id, int param) {
|
||||
if (id == 1) {
|
||||
if (level != null && level.isClientSide) {
|
||||
scheduleRenderUpdate();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return super.triggerEvent(id, param);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.imbgt.kineticbridge.datagen;
|
||||
|
||||
import com.gregtechceu.gtceu.api.GTValues;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.packs.PackType;
|
||||
import net.minecraftforge.data.event.GatherDataEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
import com.imbgt.kineticbridge.KineticBridge;
|
||||
import com.tterrag.registrate.providers.ProviderType;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = KineticBridge.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public final class KineticBridgeDatagen {
|
||||
|
||||
private KineticBridgeDatagen() {}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void gatherData(GatherDataEvent event) {
|
||||
var helper = event.getExistingFileHelper();
|
||||
helper.trackGenerated(new ResourceLocation("gtceu", "block/machine/part/energy_output_hatch"),
|
||||
PackType.CLIENT_RESOURCES, ".json", "models");
|
||||
helper.trackGenerated(KineticBridge.id("block/machine/part/kinetic_output_hatch_overlay"),
|
||||
PackType.CLIENT_RESOURCES, ".json", "models");
|
||||
|
||||
String[] textureKeys = { "bottom", "top", "side" };
|
||||
for (int tier : GTValues.ALL_TIERS) {
|
||||
String tierName = GTValues.VN[tier].toLowerCase(java.util.Locale.ROOT);
|
||||
for (String key : textureKeys) {
|
||||
helper.trackGenerated(new ResourceLocation("gtceu",
|
||||
"block/casings/voltage/" + tierName + "/" + key),
|
||||
PackType.CLIENT_RESOURCES, ".png", "textures");
|
||||
}
|
||||
}
|
||||
if (event.includeClient()) {
|
||||
KineticBridge.REGISTRATE.addDataGenerator(ProviderType.LANG, provider -> {
|
||||
provider.add("tooltip.kineticbridge.max_power", "Max Output: %s EU/t");
|
||||
provider.add("tooltip.kineticbridge.max_stress", "Active Capacity: %s SU @ %s RPM");
|
||||
provider.add("tooltip.kineticbridge.last_tick_power", "Last Tick Draw: %s EU");
|
||||
provider.add("kineticbridge.tooltip.rpm", "Outputs Create rotation at %s RPM");
|
||||
provider.add("kineticbridge.tooltip.capacity", "Provides up to %s SU (~%s EU/t)");
|
||||
});
|
||||
var output = event.getGenerator().getPackOutput();
|
||||
event.getGenerator().addProvider(true, new KineticBridgeMachineModelProvider(output));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.imbgt.kineticbridge.datagen;
|
||||
|
||||
import com.gregtechceu.gtceu.api.GTValues;
|
||||
|
||||
import net.minecraft.data.CachedOutput;
|
||||
import net.minecraft.data.DataProvider;
|
||||
import net.minecraft.data.PackOutput;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.imbgt.kineticbridge.KineticBridge;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class KineticBridgeMachineModelProvider implements DataProvider {
|
||||
|
||||
private final PackOutput output;
|
||||
|
||||
public KineticBridgeMachineModelProvider(PackOutput output) {
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<?> run(CachedOutput cache) {
|
||||
try {
|
||||
for (int tier : GTValues.ALL_TIERS) {
|
||||
String tierName = GTValues.VN[tier].toLowerCase(Locale.ROOT);
|
||||
String machineId = tierName + "_kinetic_output_hatch";
|
||||
|
||||
writeBlockModel(cache, tierName, machineId);
|
||||
writeBlockState(cache, machineId);
|
||||
writeItemModel(cache, machineId);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
}
|
||||
|
||||
private void writeBlockState(CachedOutput cache, String machineId) throws IOException {
|
||||
JsonObject root = new JsonObject();
|
||||
JsonObject variants = new JsonObject();
|
||||
root.add("variants", variants);
|
||||
|
||||
String modelPath = "kineticbridge:block/machine/" + machineId;
|
||||
variants.add("facing=down", rot(modelPath, 90, null));
|
||||
variants.add("facing=east", rot(modelPath, null, 90));
|
||||
variants.add("facing=north", rot(modelPath, null, null));
|
||||
variants.add("facing=south", rot(modelPath, null, 180));
|
||||
variants.add("facing=up", rotWithGtZ(modelPath, 270, 180));
|
||||
variants.add("facing=west", rot(modelPath, null, 270));
|
||||
|
||||
Path path = resourcePath("blockstates", machineId);
|
||||
DataProvider.saveStable(cache, root, path);
|
||||
}
|
||||
|
||||
private JsonObject rot(String model, Integer x, Integer y) {
|
||||
JsonObject obj = new JsonObject();
|
||||
obj.addProperty("model", model);
|
||||
if (x != null) {
|
||||
obj.addProperty("x", x);
|
||||
}
|
||||
if (y != null) {
|
||||
obj.addProperty("y", y);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
private JsonObject rotWithGtZ(String model, int x, int z) {
|
||||
JsonObject obj = rot(model, x, null);
|
||||
obj.addProperty("gtceu:z", z);
|
||||
return obj;
|
||||
}
|
||||
|
||||
private void writeBlockModel(CachedOutput cache, String tierName, String machineId) throws IOException {
|
||||
JsonObject root = new JsonObject();
|
||||
root.addProperty("parent", "minecraft:block/block");
|
||||
root.addProperty("loader", "gtceu:machine");
|
||||
root.addProperty("machine", KineticBridge.MOD_ID + ":" + machineId);
|
||||
|
||||
JsonArray replaceable = new JsonArray();
|
||||
replaceable.add("bottom");
|
||||
replaceable.add("top");
|
||||
replaceable.add("side");
|
||||
root.add("replaceable_textures", replaceable);
|
||||
|
||||
JsonObject variants = new JsonObject();
|
||||
JsonObject emptyVariant = new JsonObject();
|
||||
JsonObject model = new JsonObject();
|
||||
model.addProperty("parent", "gtceu:block/machine/part/energy_output_hatch");
|
||||
JsonObject textures = new JsonObject();
|
||||
textures.addProperty("bottom", "gtceu:block/casings/voltage/" + tierName + "/bottom");
|
||||
textures.addProperty("side", "gtceu:block/casings/voltage/" + tierName + "/side");
|
||||
textures.addProperty("top", "gtceu:block/casings/voltage/" + tierName + "/top");
|
||||
model.add("textures", textures);
|
||||
emptyVariant.add("model", model);
|
||||
variants.add("", emptyVariant);
|
||||
root.add("variants", variants);
|
||||
|
||||
Path path = resourcePath("models/block/machine", machineId);
|
||||
DataProvider.saveStable(cache, root, path);
|
||||
}
|
||||
|
||||
private void writeItemModel(CachedOutput cache, String machineId) throws IOException {
|
||||
JsonObject root = new JsonObject();
|
||||
root.addProperty("parent", "kineticbridge:block/machine/" + machineId);
|
||||
Path path = resourcePath("models/item", machineId);
|
||||
DataProvider.saveStable(cache, root, path);
|
||||
}
|
||||
|
||||
private Path resourcePath(String folder, String machineId) {
|
||||
return output.getOutputFolder(PackOutput.Target.RESOURCE_PACK)
|
||||
.resolve("assets/" + KineticBridge.MOD_ID + "/" + folder + "/" + machineId + ".json");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Kinetic Bridge machine models";
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,50 @@ package com.imbgt.kineticbridge.machine;
|
||||
|
||||
import com.gregtechceu.gtceu.api.capability.recipe.IO;
|
||||
import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity;
|
||||
import com.gregtechceu.gtceu.api.machine.trait.NotifiableEnergyContainer;
|
||||
import com.gregtechceu.gtceu.common.machine.multiblock.part.EnergyHatchPartMachine;
|
||||
|
||||
public class KineticOutputHatchPartMachine extends EnergyHatchPartMachine {
|
||||
|
||||
public static final float TARGET_RPM = 256.0f;
|
||||
|
||||
public KineticOutputHatchPartMachine(IMachineBlockEntity holder, int tier, int amperage) {
|
||||
super(holder, tier, IO.OUT, amperage);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected NotifiableEnergyContainer createEnergyContainer(Object... args) {
|
||||
NotifiableEnergyContainer container = super.createEnergyContainer(args);
|
||||
container.setSideOutputCondition(side -> false);
|
||||
container.setCapabilityValidator(side -> side == null);
|
||||
return container;
|
||||
}
|
||||
|
||||
public long getMaxPowerPerTick() {
|
||||
return energyContainer.getOutputVoltage() * energyContainer.getOutputAmperage();
|
||||
}
|
||||
|
||||
public float getTargetRpm() {
|
||||
return TARGET_RPM;
|
||||
}
|
||||
|
||||
public NotifiableEnergyContainer getEnergyContainer() {
|
||||
return energyContainer;
|
||||
}
|
||||
|
||||
private int reportedRotorSpeed;
|
||||
private int maxRotorSpeed = 1;
|
||||
|
||||
public void updateRotorTelemetry(int rotorSpeed, int maxSpeed) {
|
||||
this.reportedRotorSpeed = Math.max(0, rotorSpeed);
|
||||
this.maxRotorSpeed = Math.max(1, maxSpeed);
|
||||
}
|
||||
|
||||
public int getRotorSpeed() {
|
||||
return reportedRotorSpeed;
|
||||
}
|
||||
|
||||
public int getMaxRotorSpeed() {
|
||||
return Math.max(1, maxRotorSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "gtceu:block/machine/part/energy_output_hatch"
|
||||
}
|
||||
Reference in New Issue
Block a user