Fixed mipmaps, a bunch of other goodies
|
@ -9,7 +9,7 @@ yarn_mappings=1.21.1+build.3
|
||||||
loader_version=0.16.10
|
loader_version=0.16.10
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=0.0.1.alpha.3
|
mod_version=0.0.1.alpha.4
|
||||||
maven_group=arzumify.coretechs
|
maven_group=arzumify.coretechs
|
||||||
archives_base_name=coretechs
|
archives_base_name=coretechs
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class CopperWire extends BlockWithEntity implements PolymerTexturedBlock
|
||||||
@Override
|
@Override
|
||||||
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
|
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
|
||||||
System.out.println("onStateReplaced");
|
System.out.println("onStateReplaced");
|
||||||
if (!world.isClient() && state.isOf(newState.getBlock())) {
|
if (!world.isClient() && !state.isOf(newState.getBlock())) {
|
||||||
System.out.println("world is not client");
|
System.out.println("world is not client");
|
||||||
var entity = world.getBlockEntity(pos);
|
var entity = world.getBlockEntity(pos);
|
||||||
System.out.println("entity: " + entity);
|
System.out.println("entity: " + entity);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package arzumify.coretechs.energy;
|
package arzumify.coretechs.energy;
|
||||||
|
|
||||||
import arzumify.coretechs.BlockEntityTypes;
|
import arzumify.coretechs.BlockEntityTypes;
|
||||||
|
import arzumify.located.math.Vec3i;
|
||||||
import arzumify.polyenergy.api.EnergyProvider;
|
import arzumify.polyenergy.api.EnergyProvider;
|
||||||
import arzumify.polyenergy.api.EnergyReceiver;
|
import arzumify.polyenergy.api.EnergyReceiver;
|
||||||
import arzumify.located.math.Vec3i;
|
|
||||||
import arzumify.polyenergy.impl.MatchMaker;
|
import arzumify.polyenergy.impl.MatchMaker;
|
||||||
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerBlockEntityEvents;
|
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerBlockEntityEvents;
|
||||||
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
|
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
|
||||||
|
@ -87,8 +87,7 @@ public class CopperWireEntity extends BlockEntity implements EnergyProvider, Ene
|
||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUnload(BlockEntity blockEntity, ServerWorld serverWorld) {
|
public void onUnload(BlockEntity blockEntity, ServerWorld serverWorld) {
|
||||||
MatchMaker.matchMaker.Remove(this);
|
MatchMaker.matchMaker.Remove(this);
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class CreativeGenerator extends BlockWithEntity implements BlockEntityPro
|
||||||
@Override
|
@Override
|
||||||
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
|
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
|
||||||
System.out.println("onStateReplaced");
|
System.out.println("onStateReplaced");
|
||||||
if (!world.isClient() && state.isOf(newState.getBlock())) {
|
if (!world.isClient() && !state.isOf(newState.getBlock())) {
|
||||||
System.out.println("world is not client");
|
System.out.println("world is not client");
|
||||||
var entity = world.getBlockEntity(pos);
|
var entity = world.getBlockEntity(pos);
|
||||||
System.out.println("entity: " + entity);
|
System.out.println("entity: " + entity);
|
||||||
|
|
|
@ -18,7 +18,6 @@ import net.minecraft.server.world.ServerWorld;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.WorldAccess;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public class Magnet extends BlockWithEntity implements BlockEntityProvider, PolymerTexturedBlock {
|
public class Magnet extends BlockWithEntity implements BlockEntityProvider, PolymerTexturedBlock {
|
||||||
|
@ -42,7 +41,7 @@ public class Magnet extends BlockWithEntity implements BlockEntityProvider, Poly
|
||||||
@Override
|
@Override
|
||||||
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
|
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
|
||||||
System.out.println("onStateReplaced");
|
System.out.println("onStateReplaced");
|
||||||
if (!world.isClient() && state.isOf(newState.getBlock())) {
|
if (!world.isClient() && !state.isOf(newState.getBlock())) {
|
||||||
System.out.println("world is not client");
|
System.out.println("world is not client");
|
||||||
var entity = world.getBlockEntity(pos);
|
var entity = world.getBlockEntity(pos);
|
||||||
System.out.println("entity: " + entity);
|
System.out.println("entity: " + entity);
|
||||||
|
@ -53,11 +52,6 @@ public class Magnet extends BlockWithEntity implements BlockEntityProvider, Poly
|
||||||
super.onStateReplaced(state, world, pos, newState, moved);
|
super.onStateReplaced(state, world, pos, newState, moved);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBroken(WorldAccess world, BlockPos pos, BlockState state) {
|
|
||||||
super.onBroken(world, pos, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected MapCodec<? extends BlockWithEntity> getCodec() {
|
protected MapCodec<? extends BlockWithEntity> getCodec() {
|
||||||
return createCodec(Magnet::new);
|
return createCodec(Magnet::new);
|
||||||
|
|
|
@ -18,7 +18,6 @@ import net.minecraft.server.world.ServerWorld;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.WorldAccess;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public class Summoner extends BlockWithEntity implements BlockEntityProvider, PolymerTexturedBlock {
|
public class Summoner extends BlockWithEntity implements BlockEntityProvider, PolymerTexturedBlock {
|
||||||
|
@ -42,7 +41,7 @@ public class Summoner extends BlockWithEntity implements BlockEntityProvider, Po
|
||||||
@Override
|
@Override
|
||||||
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
|
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
|
||||||
System.out.println("onStateReplaced");
|
System.out.println("onStateReplaced");
|
||||||
if (!world.isClient() && state.isOf(newState.getBlock())) {
|
if (!world.isClient() && !state.isOf(newState.getBlock())) {
|
||||||
System.out.println("world is not client");
|
System.out.println("world is not client");
|
||||||
var entity = world.getBlockEntity(pos);
|
var entity = world.getBlockEntity(pos);
|
||||||
System.out.println("entity: " + entity);
|
System.out.println("entity: " + entity);
|
||||||
|
@ -53,11 +52,6 @@ public class Summoner extends BlockWithEntity implements BlockEntityProvider, Po
|
||||||
super.onStateReplaced(state, world, pos, newState, moved);
|
super.onStateReplaced(state, world, pos, newState, moved);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBroken(WorldAccess world, BlockPos pos, BlockState state) {
|
|
||||||
super.onBroken(world, pos, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected MapCodec<? extends BlockWithEntity> getCodec() {
|
protected MapCodec<? extends BlockWithEntity> getCodec() {
|
||||||
return createCodec(Summoner::new);
|
return createCodec(Summoner::new);
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class Voltmeter extends BlockWithEntity implements BlockEntityProvider, P
|
||||||
@Override
|
@Override
|
||||||
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
|
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
|
||||||
System.out.println("onStateReplaced");
|
System.out.println("onStateReplaced");
|
||||||
if (!world.isClient() && state.isOf(newState.getBlock())) {
|
if (!world.isClient() && !state.isOf(newState.getBlock())) {
|
||||||
System.out.println("world is not client");
|
System.out.println("world is not client");
|
||||||
var entity = world.getBlockEntity(pos);
|
var entity = world.getBlockEntity(pos);
|
||||||
System.out.println("entity: " + entity);
|
System.out.println("entity: " + entity);
|
||||||
|
|
BIN
src/main/resources/assets/coretechs/icon-original.png
Executable file
After Width: | Height: | Size: 768 B |
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 12 KiB |
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
"credit": "Made with Blockbench",
|
"credit": "Made with Blockbench",
|
||||||
"parent": "block/block",
|
"parent": "block/block",
|
||||||
"texture_size": [23, 23],
|
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "coretechs:item/magnet",
|
"0": "coretechs:item/magnet",
|
||||||
"particle": "coretechs:item/magnet"
|
"particle": "coretechs:item/magnet"
|
||||||
|
@ -11,24 +10,120 @@
|
||||||
"from": [2, 0, 2],
|
"from": [2, 0, 2],
|
||||||
"to": [14, 1, 14],
|
"to": [14, 1, 14],
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [6.26087, 0, 14.6087, 0.69565], "texture": "#0"},
|
"north": {
|
||||||
"east": {"uv": [6.26087, 0, 14.6087, 0.69565], "texture": "#0"},
|
"uv": [
|
||||||
"south": {"uv": [6.26087, 0, 14.6087, 0.69565], "texture": "#0"},
|
4.5,
|
||||||
"west": {"uv": [6.26087, 0.69565, 14.6087, 0], "texture": "#0"},
|
5.5,
|
||||||
"up": {"uv": [6.26087, 0, 14.6087, 8.34783], "texture": "#0"},
|
10.5,
|
||||||
"down": {"uv": [6.26087, 0, 14.6087, 8.34783], "texture": "#0"}
|
6
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
},
|
||||||
|
"east": {
|
||||||
|
"uv": [
|
||||||
|
4.5,
|
||||||
|
5.5,
|
||||||
|
10.5,
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
},
|
||||||
|
"south": {
|
||||||
|
"uv": [
|
||||||
|
4.5,
|
||||||
|
5.5,
|
||||||
|
10.5,
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
},
|
||||||
|
"west": {
|
||||||
|
"uv": [
|
||||||
|
4.5,
|
||||||
|
5.5,
|
||||||
|
10.5,
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
},
|
||||||
|
"up": {
|
||||||
|
"uv": [
|
||||||
|
4.5,
|
||||||
|
0,
|
||||||
|
10.5,
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
},
|
||||||
|
"down": {
|
||||||
|
"uv": [
|
||||||
|
4.5,
|
||||||
|
0,
|
||||||
|
10.5,
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [3, 2, 3],
|
"from": [3, 2, 3],
|
||||||
"to": [13, 16, 13],
|
"to": [13, 16, 13],
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 6.95652, 9.73913], "texture": "#0"},
|
"north": {
|
||||||
"east": {"uv": [0, 0, 6.95652, 9.73913], "texture": "#0"},
|
"uv": [
|
||||||
"south": {"uv": [0, 0, 6.95652, 9.73913], "texture": "#0"},
|
0,
|
||||||
"west": {"uv": [0, 0, 6.95652, 9.73913], "texture": "#0"},
|
0,
|
||||||
"up": {"uv": [6.95652, 16, 0, 9.04348], "texture": "#0"},
|
5,
|
||||||
"down": {"uv": [6.95652, 9.04348, 0, 16], "texture": "#0"}
|
7
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
},
|
||||||
|
"east": {
|
||||||
|
"uv": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
5,
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
},
|
||||||
|
"south": {
|
||||||
|
"uv": [
|
||||||
|
5,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
},
|
||||||
|
"west": {
|
||||||
|
"uv": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
5,
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
},
|
||||||
|
"up": {
|
||||||
|
"uv": [
|
||||||
|
0,
|
||||||
|
6.5,
|
||||||
|
5,
|
||||||
|
11.5
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
},
|
||||||
|
"down": {
|
||||||
|
"uv": [
|
||||||
|
0,
|
||||||
|
6.5,
|
||||||
|
5,
|
||||||
|
11.5
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -40,47 +135,116 @@
|
||||||
"east": {"uv": [0.69565, 0.69565, 3.47826, 1.3913], "texture": "#0"},
|
"east": {"uv": [0.69565, 0.69565, 3.47826, 1.3913], "texture": "#0"},
|
||||||
"south": {"uv": [0.69565, 0.69565, 3.47826, 1.3913], "texture": "#0"},
|
"south": {"uv": [0.69565, 0.69565, 3.47826, 1.3913], "texture": "#0"},
|
||||||
"west": {"uv": [0.69565, 0.69565, 3.47826, 1.3913], "texture": "#0"},
|
"west": {"uv": [0.69565, 0.69565, 3.47826, 1.3913], "texture": "#0"},
|
||||||
"up": {"uv": [0, 0, 2.78261, 2.78261], "texture": "#missing"},
|
"up": {
|
||||||
"down": {"uv": [0, 0, 2.78261, 2.78261], "texture": "#missing"}
|
"uv": [
|
||||||
|
8,
|
||||||
|
1.5,
|
||||||
|
10,
|
||||||
|
3.5
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
},
|
||||||
|
"down": {
|
||||||
|
"uv": [
|
||||||
|
8,
|
||||||
|
1.5,
|
||||||
|
10,
|
||||||
|
3.5
|
||||||
|
],
|
||||||
|
"texture": "#0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"gui_light": "side",
|
|
||||||
"display": {
|
"display": {
|
||||||
"gui": {
|
|
||||||
"rotation": [ 30, 225, 0 ],
|
|
||||||
"translation": [ 0, 0, 0],
|
|
||||||
"scale":[ 0.625, 0.625, 0.625 ]
|
|
||||||
},
|
|
||||||
"ground": {
|
|
||||||
"rotation": [ 0, 0, 0 ],
|
|
||||||
"translation": [ 0, 3, 0],
|
|
||||||
"scale":[ 0.25, 0.25, 0.25 ]
|
|
||||||
},
|
|
||||||
"fixed": {
|
|
||||||
"rotation": [ 0, 0, 0 ],
|
|
||||||
"translation": [ 0, 0, 0],
|
|
||||||
"scale":[ 0.5, 0.5, 0.5 ]
|
|
||||||
},
|
|
||||||
"thirdperson_righthand": {
|
"thirdperson_righthand": {
|
||||||
"rotation": [ 75, 45, 0 ],
|
"rotation": [
|
||||||
"translation": [ 0, 2.5, 0],
|
75,
|
||||||
"scale": [ 0.375, 0.375, 0.375 ]
|
45,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"translation": [
|
||||||
|
0,
|
||||||
|
2.5,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.375,
|
||||||
|
0.375,
|
||||||
|
0.375
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"thirdperson_lefthand": {
|
"thirdperson_lefthand": {
|
||||||
"rotation": [ 75, 45, 0 ],
|
"rotation": [
|
||||||
"translation": [ 0, 2.5, 0],
|
75,
|
||||||
"scale": [ 0.375, 0.375, 0.375 ]
|
45,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"translation": [
|
||||||
|
0,
|
||||||
|
2.5,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.375,
|
||||||
|
0.375,
|
||||||
|
0.375
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"firstperson_righthand": {
|
"firstperson_righthand": {
|
||||||
"rotation": [ 0, 45, 0 ],
|
"rotation": [
|
||||||
"translation": [ 0, 0, 0 ],
|
0,
|
||||||
"scale": [ 0.40, 0.40, 0.40 ]
|
45,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.4,
|
||||||
|
0.4,
|
||||||
|
0.4
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"firstperson_lefthand": {
|
"firstperson_lefthand": {
|
||||||
"rotation": [ 0, 225, 0 ],
|
"rotation": [
|
||||||
"translation": [ 0, 0, 0 ],
|
0,
|
||||||
"scale": [ 0.40, 0.40, 0.40 ]
|
225,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.4,
|
||||||
|
0.4,
|
||||||
|
0.4
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ground": {
|
||||||
|
"translation": [
|
||||||
|
0,
|
||||||
|
3,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.25,
|
||||||
|
0.25,
|
||||||
|
0.25
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"gui": {
|
||||||
|
"rotation": [
|
||||||
|
30,
|
||||||
|
225,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.625,
|
||||||
|
0.625,
|
||||||
|
0.625
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"scale": [
|
||||||
|
0.5,
|
||||||
|
0.5,
|
||||||
|
0.5
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 612 B |
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 257 B After Width: | Height: | Size: 275 B |
|
@ -24,7 +24,8 @@
|
||||||
"minecraft": ">1.20",
|
"minecraft": ">1.20",
|
||||||
"java": ">=21",
|
"java": ">=21",
|
||||||
"fabric-api": "*",
|
"fabric-api": "*",
|
||||||
"polymer-bundled": "*"
|
"polymer-bundled": "*",
|
||||||
|
"polyenergy": "*"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
}
|
}
|
||||||
|
|