Skip to content

Commit

Permalink
Cleanup Code and migrate EntityType
Browse files Browse the repository at this point in the history
  • Loading branch information
MarbleGateKeeper committed Oct 18, 2024
1 parent a8e3a31 commit 9af41c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
import net.minecraft.entity.data.TrackedData;
import net.minecraft.entity.data.TrackedDataHandlerRegistry;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.network.listener.ClientPlayPacketListener;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket;
import net.minecraft.server.network.EntityTrackerEntry;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package plus.dragons.splashmilk.fabric.registry;

import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder;
import net.minecraft.entity.EntityDimensions;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.SpawnGroup;
import net.minecraft.registry.Registries;
Expand All @@ -17,11 +15,11 @@ public class EntityRegistry {

public static void ini() {
MILK_AREA_EFFECT_CLOUD = Registry.register(Registries.ENTITY_TYPE, Identifier.of(SplashMilk.MOD_ID, "milk_area_effect_cloud"),
FabricEntityTypeBuilder.<MIlkAreaEffectCloudEntity>create(SpawnGroup.MISC, MIlkAreaEffectCloudEntity::new)
.dimensions(EntityDimensions.fixed(6.0f, 0.5f)).fireImmune().trackRangeBlocks(10).build());
EntityType.Builder.<MIlkAreaEffectCloudEntity>create(MIlkAreaEffectCloudEntity::new,SpawnGroup.MISC)
.dimensions(6.0f, 0.5f).makeFireImmune().trackingTickInterval(10).build());
MILK_BOTTLE = Registry.register(Registries.ENTITY_TYPE, Identifier.of(SplashMilk.MOD_ID, "milk_bottle"),
FabricEntityTypeBuilder.<MilkBottleEntity>create(SpawnGroup.MISC, MilkBottleEntity::new)
.dimensions(EntityDimensions.fixed(0.5f, 0.5f)).fireImmune().trackedUpdateRate(20).trackRangeBlocks(10).build());
EntityType.Builder.<MilkBottleEntity>create(MilkBottleEntity::new,SpawnGroup.MISC)
.dimensions(0.5f, 0.5f).makeFireImmune().trackingTickInterval(20).maxTrackingRange(10).build());

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import net.neoforged.api.distmarker.OnlyIn;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.client.event.EntityRenderersEvent;
import plus.dragons.splashmilk.neoforge.SplashMilk;

Expand Down

0 comments on commit 9af41c1

Please sign in to comment.