Fixed mipmaps, a bunch of other goodies

This commit is contained in:
Tracker-Friendly 2025-03-15 15:58:55 +00:00
parent 854ad611b3
commit 0ca725187f
15 changed files with 217 additions and 65 deletions

View File

@ -9,7 +9,7 @@ yarn_mappings=1.21.1+build.3
loader_version=0.16.10
# Mod Properties
mod_version=0.0.1.alpha.3
mod_version=0.0.1.alpha.4
maven_group=arzumify.coretechs
archives_base_name=coretechs

View File

@ -45,7 +45,7 @@ public class CopperWire extends BlockWithEntity implements PolymerTexturedBlock
@Override
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
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");
var entity = world.getBlockEntity(pos);
System.out.println("entity: " + entity);

View File

@ -1,9 +1,9 @@
package arzumify.coretechs.energy;
import arzumify.coretechs.BlockEntityTypes;
import arzumify.located.math.Vec3i;
import arzumify.polyenergy.api.EnergyProvider;
import arzumify.polyenergy.api.EnergyReceiver;
import arzumify.located.math.Vec3i;
import arzumify.polyenergy.impl.MatchMaker;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerBlockEntityEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
@ -87,8 +87,7 @@ public class CopperWireEntity extends BlockEntity implements EnergyProvider, Ene
reload();
}
@Override
public void onUnload(BlockEntity blockEntity, ServerWorld serverWorld) {
MatchMaker.matchMaker.Remove(this);

View File

@ -39,7 +39,7 @@ public class CreativeGenerator extends BlockWithEntity implements BlockEntityPro
@Override
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
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");
var entity = world.getBlockEntity(pos);
System.out.println("entity: " + entity);

View File

@ -18,7 +18,6 @@ import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.WorldAccess;
import org.jetbrains.annotations.Nullable;
public class Magnet extends BlockWithEntity implements BlockEntityProvider, PolymerTexturedBlock {
@ -42,7 +41,7 @@ public class Magnet extends BlockWithEntity implements BlockEntityProvider, Poly
@Override
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
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");
var entity = world.getBlockEntity(pos);
System.out.println("entity: " + entity);
@ -53,11 +52,6 @@ public class Magnet extends BlockWithEntity implements BlockEntityProvider, Poly
super.onStateReplaced(state, world, pos, newState, moved);
}
@Override
public void onBroken(WorldAccess world, BlockPos pos, BlockState state) {
super.onBroken(world, pos, state);
}
@Override
protected MapCodec<? extends BlockWithEntity> getCodec() {
return createCodec(Magnet::new);

View File

@ -18,7 +18,6 @@ import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.WorldAccess;
import org.jetbrains.annotations.Nullable;
public class Summoner extends BlockWithEntity implements BlockEntityProvider, PolymerTexturedBlock {
@ -42,7 +41,7 @@ public class Summoner extends BlockWithEntity implements BlockEntityProvider, Po
@Override
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
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");
var entity = world.getBlockEntity(pos);
System.out.println("entity: " + entity);
@ -53,11 +52,6 @@ public class Summoner extends BlockWithEntity implements BlockEntityProvider, Po
super.onStateReplaced(state, world, pos, newState, moved);
}
@Override
public void onBroken(WorldAccess world, BlockPos pos, BlockState state) {
super.onBroken(world, pos, state);
}
@Override
protected MapCodec<? extends BlockWithEntity> getCodec() {
return createCodec(Summoner::new);

View File

@ -41,7 +41,7 @@ public class Voltmeter extends BlockWithEntity implements BlockEntityProvider, P
@Override
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
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");
var entity = world.getBlockEntity(pos);
System.out.println("entity: " + entity);

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,7 +1,6 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"texture_size": [23, 23],
"textures": {
"0": "coretechs:item/magnet",
"particle": "coretechs:item/magnet"
@ -11,24 +10,120 @@
"from": [2, 0, 2],
"to": [14, 1, 14],
"faces": {
"north": {"uv": [6.26087, 0, 14.6087, 0.69565], "texture": "#0"},
"east": {"uv": [6.26087, 0, 14.6087, 0.69565], "texture": "#0"},
"south": {"uv": [6.26087, 0, 14.6087, 0.69565], "texture": "#0"},
"west": {"uv": [6.26087, 0.69565, 14.6087, 0], "texture": "#0"},
"up": {"uv": [6.26087, 0, 14.6087, 8.34783], "texture": "#0"},
"down": {"uv": [6.26087, 0, 14.6087, 8.34783], "texture": "#0"}
"north": {
"uv": [
4.5,
5.5,
10.5,
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],
"to": [13, 16, 13],
"faces": {
"north": {"uv": [0, 0, 6.95652, 9.73913], "texture": "#0"},
"east": {"uv": [0, 0, 6.95652, 9.73913], "texture": "#0"},
"south": {"uv": [0, 0, 6.95652, 9.73913], "texture": "#0"},
"west": {"uv": [0, 0, 6.95652, 9.73913], "texture": "#0"},
"up": {"uv": [6.95652, 16, 0, 9.04348], "texture": "#0"},
"down": {"uv": [6.95652, 9.04348, 0, 16], "texture": "#0"}
"north": {
"uv": [
0,
0,
5,
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"},
"south": {"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"},
"down": {"uv": [0, 0, 2.78261, 2.78261], "texture": "#missing"}
"up": {
"uv": [
8,
1.5,
10,
3.5
],
"texture": "#0"
},
"down": {
"uv": [
8,
1.5,
10,
3.5
],
"texture": "#0"
}
}
}
],
"gui_light": "side",
"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": {
"rotation": [ 75, 45, 0 ],
"translation": [ 0, 2.5, 0],
"scale": [ 0.375, 0.375, 0.375 ]
"rotation": [
75,
45,
0
],
"translation": [
0,
2.5,
0
],
"scale": [
0.375,
0.375,
0.375
]
},
"thirdperson_lefthand": {
"rotation": [ 75, 45, 0 ],
"translation": [ 0, 2.5, 0],
"scale": [ 0.375, 0.375, 0.375 ]
"rotation": [
75,
45,
0
],
"translation": [
0,
2.5,
0
],
"scale": [
0.375,
0.375,
0.375
]
},
"firstperson_righthand": {
"rotation": [ 0, 45, 0 ],
"translation": [ 0, 0, 0 ],
"scale": [ 0.40, 0.40, 0.40 ]
"rotation": [
0,
45,
0
],
"scale": [
0.4,
0.4,
0.4
]
},
"firstperson_lefthand": {
"rotation": [ 0, 225, 0 ],
"translation": [ 0, 0, 0 ],
"scale": [ 0.40, 0.40, 0.40 ]
"rotation": [
0,
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
]
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 B

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 275 B

View File

@ -24,7 +24,8 @@
"minecraft": ">1.20",
"java": ">=21",
"fabric-api": "*",
"polymer-bundled": "*"
"polymer-bundled": "*",
"polyenergy": "*"
},
"suggests": {
}