split client and server 1

This commit is contained in:
Sen 2025-05-04 20:27:55 +02:00
parent 26a15a0b15
commit 2fa521c3d1
661 changed files with 3058 additions and 2826 deletions

View file

@ -2,7 +2,6 @@ package game.block;
import java.util.List;
import game.audio.SoundType;
import game.color.Colorizer;
import game.entity.npc.EntityNPC;
import game.entity.types.EntityLiving;
@ -15,12 +14,13 @@ import game.item.Item;
import game.item.ItemShears;
import game.item.ItemStack;
import game.material.Material;
import game.model.Model;
import game.model.ModelProvider;
import game.properties.IProperty;
import game.properties.IStringSerializable;
import game.properties.PropertyEnum;
import game.renderer.blockmodel.ModelBlock;
import game.rng.Random;
import game.tileentity.TileEntity;
import game.util.Identifyable;
import game.world.BlockPos;
import game.world.Facing;
import game.world.Facing.Axis;
@ -345,9 +345,9 @@ public class BlockDoublePlant extends BlockBush implements IGrowable
// return EnumOffsetType.XZ;
// }
public ModelBlock getModel(String name, State state) {
public Model getModel(ModelProvider provider, String name, State state) {
if(state.getValue(VARIANT) == EnumPlantType.SUNFLOWER && state.getValue(HALF) == EnumBlockHalf.UPPER)
return new ModelBlock("sunflower_front").noOcclude()
return provider.getModel("sunflower_front").noOcclude()
.add(0.8f, 0f, 8f, 15.2f, 8f, 8f).noShade().rotate(8, 8, 8, Axis.Y, 45, true).ns("sunflower_top")
.uv(0, 8, 16, 16).noCull()
.add(8f, 0f, 0.8f, 8f, 8f, 15.2f).noShade().rotate(8, 8, 8, Axis.Y, 45, true).we("sunflower_top")
@ -355,10 +355,10 @@ public class BlockDoublePlant extends BlockBush implements IGrowable
.add(9.6f, -1f, 1f, 9.6f, 15f, 15f).noShade().rotate(8, 8, 8, Axis.Z, 22.5f, true).w("sunflower_back")
.uv(0, 0, 16, 16).noCull().e().uv(0, 0, 16, 16).noCull();
else if(state.getValue(VARIANT) == EnumPlantType.FERN || state.getValue(VARIANT) == EnumPlantType.GRASS)
return new ModelBlock(state.getValue(VARIANT).getName() + "_" + (state.getValue(HALF) == EnumBlockHalf.UPPER
return provider.getModel(state.getValue(VARIANT).getName() + "_" + (state.getValue(HALF) == EnumBlockHalf.UPPER
? "top" : "bottom")).crossTint();
else
return new ModelBlock(state.getValue(VARIANT).getName() + "_" + (state.getValue(HALF) == EnumBlockHalf.UPPER
return provider.getModel(state.getValue(VARIANT).getName() + "_" + (state.getValue(HALF) == EnumBlockHalf.UPPER
? "top" : "bottom")).cross();
}
@ -366,7 +366,7 @@ public class BlockDoublePlant extends BlockBush implements IGrowable
return new IProperty[] {FACING};
}
public static enum EnumBlockHalf implements IStringSerializable
public static enum EnumBlockHalf implements Identifyable
{
UPPER,
LOWER;
@ -382,7 +382,7 @@ public class BlockDoublePlant extends BlockBush implements IGrowable
}
}
public static enum EnumPlantType implements IStringSerializable
public static enum EnumPlantType implements Identifyable
{
SUNFLOWER(0, "sunflower", "Sonnenblume"),
SYRINGA(1, "syringa", "Flieder"),