Skip to content

Commit

Permalink
Ducktaped it back
Browse files Browse the repository at this point in the history
  • Loading branch information
Lykrast committed Mar 5, 2022
1 parent 2280381 commit fa0c7ad
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/main/java/lykrast/gunswithoutroses/registry/ModEntities.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@

@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD, modid = GunsWithoutRoses.MODID)
public class ModEntities {
//So it doesn't like doing the build() in the static initializer now...
//Fuck it I'm copying Nature's Aura
//There's a lot of ducktape in there cause it's not how the file looked like originally
public static EntityType<BulletEntity> BULLET;

@SuppressWarnings("unchecked")
@SubscribeEvent
public static void regsiterEntities(final RegistryEvent.Register<EntityType<?>> event) {
IForgeRegistry<EntityType<?>> reg = event.getRegistry();
//So I'll ducktape it here by just moving the initializer and making it not final
BULLET = EntityType.Builder
reg.register(EntityType.Builder
.<BulletEntity>of(BulletEntity::new, MobCategory.MISC)
.sized(0.3125f, 0.3125f).setUpdateInterval(10).setTrackingRange(64).setShouldReceiveVelocityUpdates(true)
.build(GunsWithoutRoses.MODID + ":bullet");
BULLET.setRegistryName(GunsWithoutRoses.MODID, "bullet");
.build(GunsWithoutRoses.MODID + ":bullet").setRegistryName(GunsWithoutRoses.MODID, "bullet"));
BULLET = (EntityType<BulletEntity>) reg.getValue(GunsWithoutRoses.rl("bullet"));
}
}

0 comments on commit fa0c7ad

Please sign in to comment.