mirror of
https://github.com/TeamMidnightDust/Decorative.git
synced 2025-12-15 12:35:10 +01:00
Now working on vanilla clients!
This commit is contained in:
@@ -3,6 +3,7 @@ package eu.midnightdust.motschen.decorative.init;
|
||||
import eu.midnightdust.motschen.decorative.block.ChoppingLog;
|
||||
import eu.midnightdust.motschen.decorative.entity.BathTireEntity;
|
||||
import eu.midnightdust.motschen.decorative.item.BathTireItem;
|
||||
import eu.pb4.polymer.core.api.entity.PolymerEntityUtils;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.SpawnGroup;
|
||||
@@ -63,6 +64,7 @@ public class BathTires {
|
||||
private static EntityType<BathTireEntity> registerBathTire(Identifier id) {
|
||||
EntityType<BathTireEntity> entity = Registry.register(Registries.ENTITY_TYPE, id, EntityType.Builder.create(BathTireEntity::new, SpawnGroup.AMBIENT).dimensions(1.5f,1).maxTrackingRange(100).trackingTickInterval(4).build());
|
||||
FabricDefaultAttributeRegistry.register(entity, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 2.0D));
|
||||
PolymerEntityUtils.registerType(entity);
|
||||
registerItem(id, new BathTireItem(entity, new Item.Settings()), PoolGroup);
|
||||
return entity;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import eu.midnightdust.motschen.decorative.block.PoolWall;
|
||||
import eu.midnightdust.motschen.decorative.block.Springboard;
|
||||
import eu.midnightdust.motschen.decorative.entity.BeachBallEntity;
|
||||
import eu.midnightdust.motschen.decorative.item.BathTireItem;
|
||||
import eu.pb4.polymer.core.api.entity.PolymerEntityUtils;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityType;
|
||||
@@ -39,6 +40,7 @@ public class Pool {
|
||||
private static EntityType<BeachBallEntity> registerBeachBall(Identifier id) {
|
||||
EntityType<BeachBallEntity> entity = Registry.register(Registries.ENTITY_TYPE, id, EntityType.Builder.create(BeachBallEntity::new, SpawnGroup.AMBIENT).dimensions(0.9f,0.9f).maxTrackingRange(100).trackingTickInterval(4).build());
|
||||
FabricDefaultAttributeRegistry.register(entity, MobEntity.createMobAttributes().add(EntityAttributes.GENERIC_MAX_HEALTH, 100000.0D).add(EntityAttributes.GENERIC_KNOCKBACK_RESISTANCE, -10D));
|
||||
PolymerEntityUtils.registerType(entity);
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package eu.midnightdust.motschen.decorative.sound;
|
||||
|
||||
import eu.pb4.polymer.core.api.other.PolymerSoundEvent;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
@@ -15,6 +16,6 @@ public class DecorativeSoundEvents {
|
||||
}
|
||||
|
||||
private static SoundEvent register(Identifier id) {
|
||||
return Registry.register(Registries.SOUND_EVENT, id, SoundEvent.of(id));
|
||||
return Registry.register(Registries.SOUND_EVENT, id, PolymerSoundEvent.of(id, null));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user