Skip to content

Commit

Permalink
cleanup unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
MBatt1 committed Jul 10, 2024
1 parent 0240cbc commit a4a013e
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 162 deletions.
1 change: 0 additions & 1 deletion src/main/java/net/id/paradiselost/ParadiseLost.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import net.id.paradiselost.entities.passive.moa.MoaRaces;
import net.id.paradiselost.fluids.ParadiseLostFluids;
import net.id.paradiselost.items.ParadiseLostItems;
import net.id.paradiselost.loot.ParadiseLostLootNumberProviderTypes;
import net.id.paradiselost.lore.ParadiseLostLore;
import net.id.paradiselost.recipe.ParadiseLostRecipeTypes;
import net.id.paradiselost.registry.ParadiseLostRegistries;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry;
import net.id.paradiselost.ParadiseLost;
import net.minecraft.client.item.UnclampedModelPredicateProvider;
import net.minecraft.client.item.ClampedModelPredicateProvider;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack;
Expand All @@ -15,7 +15,7 @@ public class ParadiseLostModelPredicates {

public static void initClient() {

FabricModelPredicateProviderRegistry.register(ParadiseLost.locate("stackable_variant"), (new UnclampedModelPredicateProvider() {
FabricModelPredicateProviderRegistry.register(ParadiseLost.locate("stackable_variant"), (new ClampedModelPredicateProvider() {
@SuppressWarnings("deprecation")
@Override
public float call(ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity, int seed) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import net.minecraft.client.render.entity.model.AnimalModel;
import net.minecraft.client.render.entity.model.EntityModelPartNames;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3f;
import net.minecraft.util.math.Vec3d;
import org.joml.Vector3f;

import java.util.Map;

Expand Down Expand Up @@ -101,7 +102,7 @@ public void setAngles(AmbystEntity axolotlEntity, float f, float g, float h, flo
}

private void updateAnglesCache(AmbystEntity ambyst) {
Map<String, Vec3f> map = ambyst.getModelAngles();
Map<String, Vector3f> map = ambyst.getModelAngles();
map.put("body", this.getAngles(this.body));
map.put("head", this.getAngles(this.head));
map.put("right_hind_leg", this.getAngles(this.rightHindLeg));
Expand All @@ -114,12 +115,12 @@ private void updateAnglesCache(AmbystEntity ambyst) {
map.put("right_gills", this.getAngles(this.rightGills));
}

private Vec3f getAngles(ModelPart part) {
return new Vec3f(part.pitch, part.yaw, part.roll);
private Vector3f getAngles(ModelPart part) {
return new Vector3f(part.pitch, part.yaw, part.roll);
}

private void setAngles(ModelPart part, Vec3f angles) {
part.setAngles(angles.getX(), angles.getY(), angles.getZ());
private void setAngles(ModelPart part, Vector3f angles) {
part.setAngles(angles.x(), angles.y(), angles.z());
}

/**
Expand All @@ -129,7 +130,7 @@ private void resetAngles(AmbystEntity ambyst, float headYaw, float headPitch) {
this.body.pivotX = 0.0F;
this.head.pivotY = 0.0F;
this.body.pivotY = 20.0F;
Map<String, Vec3f> map = ambyst.getModelAngles();
Map<String, Vector3f> map = ambyst.getModelAngles();
if (map.isEmpty()) {
this.body.setAngles(headPitch * 0.017453292F, headYaw * 0.017453292F, 0.0F);
this.head.setAngles(0.0F, 0.0F, 0.0F);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.Vec3f;
import net.minecraft.world.World;
import org.jetbrains.annotations.Nullable;
import org.joml.Vector3f;

import java.util.Map;

public class AmbystEntity extends ParadiseLostAnimalEntity implements AngledModelEntity {
protected static final ImmutableList<? extends SensorType<? extends Sensor<? super AmbystEntity>>> SENSORS;
protected static final ImmutableList<? extends MemoryModuleType<?>> MEMORY_MODULES;
private final Map<String, Vec3f> modelAngles = Maps.newHashMap();
private final Map<String, Vector3f> modelAngles = Maps.newHashMap();

public AmbystEntity(EntityType<? extends AnimalEntity> entityType, World world) {
super(entityType, world);
Expand Down Expand Up @@ -104,7 +104,7 @@ public PassiveEntity createChild(ServerWorld world, PassiveEntity entity) {
}

@Override
public Map<String, Vec3f> getModelAngles() {
public Map<String, Vector3f> getModelAngles() {
return this.modelAngles;
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.id.paradiselost.items.misc;

import net.id.paradiselost.blocks.ParadiseLostBlocks;
import net.kyrptonaught.customportalapi.portal.PortalIgnitionSource;
import net.kyrptonaught.customportalapi.portal.PortalPlacer;
import net.minecraft.item.Item;
Expand All @@ -8,7 +9,6 @@
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3i;
import net.minecraft.util.registry.Registry;

public class ParadiseLostPortalItem extends Item {
private static final byte[][] SHAPE = new byte[][]{
Expand Down Expand Up @@ -43,23 +43,23 @@ public ActionResult useOnBlock(ItemUsageContext context) {
for (byte[] b : SHAPE) {
mut.set(context.getBlockPos());
mut.move(
context.getPlayerFacing().getAxis() == Direction.Axis.X ? b[2] : b[0],
context.getHorizontalPlayerFacing().getAxis() == Direction.Axis.X ? b[2] : b[0],
b[1],
context.getPlayerFacing().getAxis() == Direction.Axis.X ? b[0] : b[2]
context.getHorizontalPlayerFacing().getAxis() == Direction.Axis.X ? b[0] : b[2]
);

context.getWorld().setBlockState(mut, ParadiseLostConfig.CONFIG.getPortalBaseBlock(context.getWorld().getRegistryManager().get(Registry.BLOCK_KEY)).getDefaultState());
context.getWorld().setBlockState(mut, ParadiseLostBlocks.BLOOMED_CALCITE.getDefaultState());
}

// clear the inside
mut.set(context.getBlockPos());
mut.move(context.getPlayerFacing().rotateYCounterclockwise());
mut.move(context.getHorizontalPlayerFacing().rotateYCounterclockwise());
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
mut.move(Direction.UP);
context.getWorld().removeBlock(mut, false);
}
mut.move(context.getPlayerFacing().rotateYClockwise());
mut.move(context.getHorizontalPlayerFacing().rotateYClockwise());
mut.move(Vec3i.ZERO.down().down().down());
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public ChestBoatEntityMixin(EntityType<? extends BoatEntity> entityType, World w

@Inject(method = "asItem", at = @At(value = "FIELD", target = "Lnet/minecraft/item/Items;OAK_CHEST_BOAT:Lnet/minecraft/item/Item;", opcode = Opcodes.GETSTATIC), cancellable = true)
private void checkCustomBoats(CallbackInfoReturnable<Item> cir) {
BoatEntity.Type type = this.getBoatType();
BoatEntity.Type type = this.getVariant();
if (type != BoatEntity.Type.OAK) {
for (var entry : ParadiseLostItems.BOAT_SETS) {
if (type == entry.type()) {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/net/id/paradiselost/util/RegistryUtil.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package net.id.paradiselost.util;

import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.RegistryKey;
import net.minecraft.world.RegistryWorldView;
import net.minecraft.world.dimension.DimensionType;
import org.jetbrains.annotations.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import net.id.paradiselost.world.feature.tree.placers.OvergrownTrunkPlacer;
import net.id.paradiselost.world.feature.tree.placers.WisteriaFoliagePlacer;
import net.id.paradiselost.world.feature.tree.placers.WisteriaTrunkPlacer;
import net.minecraft.util.registry.Registry;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.world.gen.foliage.FoliagePlacer;
import net.minecraft.world.gen.foliage.FoliagePlacerType;
import net.minecraft.world.gen.trunk.TrunkPlacer;
Expand Down Expand Up @@ -35,11 +36,11 @@ public class ParadiseLostTreeHell {
}

public static <P extends FoliagePlacer> FoliagePlacerType<P> registerFoliage(String name, Codec<P> codec) throws IllegalAccessException, InvocationTargetException, InstantiationException {
return Registry.register(Registry.FOLIAGE_PLACER_TYPE, ParadiseLost.locate(name), foliageConstructor.newInstance(codec));
return Registry.register(Registries.FOLIAGE_PLACER_TYPE, ParadiseLost.locate(name), foliageConstructor.newInstance(codec));
}

public static <P extends TrunkPlacer> TrunkPlacerType<P> registerTrunk(String name, Codec<P> codec) throws IllegalAccessException, InvocationTargetException, InstantiationException {
return Registry.register(Registry.TRUNK_PLACER_TYPE, ParadiseLost.locate(name), trunkConstructor.newInstance(codec));
return Registry.register(Registries.TRUNK_PLACER_TYPE, ParadiseLost.locate(name), trunkConstructor.newInstance(codec));
}

public static void init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import com.mojang.serialization.Codec;
import net.minecraft.block.BlockState;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.random.Random;
import net.minecraft.util.registry.RegistryEntry;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.gen.carver.Carver;
Expand Down

0 comments on commit a4a013e

Please sign in to comment.