Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Eternaldoom

Forge Modder
  • Posts

    592
  • Joined

  • Last visited

Everything posted by Eternaldoom

  1. Hi, I'm currently updating a mod from 1.7.10 to 1.9 and wish to draw an Item's icon in 2d. Does the current item model system even allow for this? Here is the code I used before: public static void drawItem(ItemStack stack) { if (stack.getItem() instanceof ItemBlock) Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); else Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture); IIcon i = stack.getItem().getIcon(stack, 0); Tessellator t = Tessellator.instance; GL11.glPushMatrix(); t.startDrawingQuads(); t.addVertexWithUV(0, 0, 0, i.getMinU(), i.getMinV()); t.addVertexWithUV(1, 0, 0, i.getMaxU(), i.getMinV()); t.addVertexWithUV(1, 1, 0, i.getMaxU(), i.getMaxV()); t.addVertexWithUV(0, 1, 0, i.getMinU(), i.getMaxV()); t.draw(); t.startDrawingQuads(); t.addVertexWithUV(0, 0, 0, i.getMinU(), i.getMinV()); t.addVertexWithUV(0, 1, 0, i.getMinU(), i.getMaxV()); t.addVertexWithUV(1, 1, 0, i.getMaxU(), i.getMaxV()); t.addVertexWithUV(1, 0, 0, i.getMaxU(), i.getMinV()); t.draw(); GL11.glPopMatrix(); }
  2. Hi, I'm trying to make a small mod for a server that prevents the 'Cheating Essentials' mod from being used on it. What I'd like to do is see if the list of mods when the player joins contains this mod's ID, and if so, prevent the player from joining. However, I'm not quite sure how to go about this. I know the mod list is of the type FMLHandshakeMessage.ModList, and is sent in a FMLHandshakeMessage. Can I access the data in this packet when it is received? Thanks.
  3. Thanks Jabelar. Wouldn't it have to go very fast or be very small for that to look good though? I assume you just mean move each piece to the last tick position of the piece in front of it? Yes, it'll be a bit like Naga.
  4. I'd like it to be actually multipart, so the body can bend around corners and it genuinely acts like a snake.
  5. Hi, I've wanted to create a multipart snake mob for a while now. The idea is a long chain of entities that follow each other in a smooth looking animation. Here's an example of what I mean: https://www.youtube.com/watch?v=9UxAZouGJfU. So far I've tried making the parts simply follow each other, but that just looks like mobs following each other, the rotation of each piece is very wobbly. Any idea how to go about this? Thanks!
  6. Hi, I have many server -> client packets registered, all of which work fine. However, my one client -> server packet (sent to server when a key is pressed) sometimes disconnects the client with the error "internal exception io.netty.handler.codec.decoderexception packet was larger than i expected, found 5 bytes extra whilst reading packet 28." I'm registering it like so: network.registerMessage(ServerToClientMessage.Handler.class, ServerToClientMessage.class, 18, Side.CLIENT); network.registerMessage(ClientToServerMessage.Handler.class, ClientToServerMessage.class, 19, Side.SERVER); (Don't worry, there are more packets before that.) The packet itself doesn't even read or write data, it just calls a method when received. Any idea what the problem might be? Could it be related to a discrepancy in the client and server forge versions? Please let me know if you need any more info.
  7. Yep, and already tried doing that several times. So, I fixed the crash by removing my overridden verifySellingItem in EntityDivineRPGVillager. No idea why that'd made it crash. EntityDivineRPGVillager in case it's relevant: public abstract class EntityDivineRPGVillager extends EntityVillager { private int randomTickDivider; private Village villageObj; private String lastBuyingPlayer; private EntityPlayer buyingPlayer; private MerchantRecipeList buyingList; private int timeUntilReset; private boolean needsInitilization; private int wealth; private String buyersName; private float buying; public EntityDivineRPGVillager(World var1) { super(var1); this.setSize(1.0F, 2.0F); this.randomTickDivider = 0; this.villageObj = null; this.getNavigator().setBreakDoors(true); this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.3F, 0.35F)); this.tasks.addTask(1, new EntityAITradePlayer(this)); this.tasks.addTask(1, new EntityAILookAtTradePlayer(this)); this.tasks.addTask(2, new EntityAIMoveIndoors(this)); this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this)); this.tasks.addTask(4, new EntityAIOpenDoor(this, true)); this.tasks.addTask(5, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F)); this.tasks.addTask(5, new EntityAIWander(this, EntityStats.modVillagerSpeed)); setProfession(1234); } @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(net.divinerpg.entities.base.EntityStats.modVillagerHealth); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(net.divinerpg.entities.base.EntityStats.modVillagerSpeed); this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(net.divinerpg.entities.base.EntityStats.modVillagerFollowRange); } @Override public boolean isAIEnabled() { return true; } @Override protected boolean canDespawn() { return false; } @Override protected String getLivingSound() { return null; } @Override protected String getDeathSound() { return null; } @Override protected String getHurtSound() { return null; } @Override public void setProfession(int i) { super.setProfession(12345); } @Override protected void updateAITick() { if (this.randomTickDivider-- <= 0) { this.randomTickDivider = 70 + this.rand.nextInt(50); this.villageObj = this.worldObj.villageCollectionObj.findNearestVillage(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ), 32); if (this.villageObj == null) { this.detachHome(); } else { this.villageObj.setDefaultPlayerReputation(30); } } if (this.timeUntilReset > 0) { if (this.timeUntilReset <= 0) { if (this.buyingList.size() > 1) { Iterator iterator = this.buyingList.iterator(); if (needsInitilization) { while (iterator.hasNext()) { MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next(); if (merchantrecipe.isRecipeDisabled()) { merchantrecipe.func_82783_a(this.rand.nextInt(6) + this.rand.nextInt(6) + 2); } } } this.addDefaultEquipmentAndRecipies(75); this.needsInitilization = false; if (this.villageObj != null && this.lastBuyingPlayer != null) { this.villageObj.setReputationForPlayer(this.lastBuyingPlayer, 30); } } this.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0)); } } super.updateAITick(); } @Override public boolean interact(EntityPlayer var1) { if (!this.worldObj.isRemote) { extraInteract(var1); var1.openGui(DivineRPG.instance, guiID(), this.worldObj, getEntityId(), 0, 0); return true; } else { return super.interact(var1); } } public abstract void extraInteract(EntityPlayer p); public abstract int guiID(); public abstract void addRecipies(MerchantRecipeList list); @Override public void writeEntityToNBT(NBTTagCompound var1) { super.writeEntityToNBT(var1); var1.setInteger("Profession", 1234); var1.setInteger("Riches", this.wealth); if (this.buyingList != null) { var1.setTag("Offers", this.buyingList.getRecipiesAsTags()); } } @Override public void readEntityFromNBT(NBTTagCompound var1) { super.readEntityFromNBT(var1); this.setProfession(1234); this.wealth = var1.getInteger("Riches"); if (var1.hasKey("Offers")) { NBTTagCompound var2 = var1.getCompoundTag("Offers"); if (this instanceof EntityTheHunger || this instanceof EntityWorkshopTinkerer || this instanceof EntityWorkshopMerchant) this.buyingList = new InfiniteTradeList(var2); else this.buyingList = new MerchantRecipeList(var2); } } @Override public void useRecipe(MerchantRecipe var1) { var1.incrementToolUses(); if (var1.hasSameIDsAs((MerchantRecipe) this.buyingList.get(this.buyingList.size() - 1))) { this.timeUntilReset = 40; this.needsInitilization = true; if (this.buyingPlayer != null) { this.buyersName = this.buyingPlayer.getCommandSenderName(); } else { this.buyersName = null; } } if (var1.getItemToBuy().getItem() == Items.emerald) { this.wealth += var1.getItemToBuy().stackSize; } } public void func_110297_a_(ItemStack par1ItemStack) {} @Override public MerchantRecipeList getRecipes(EntityPlayer var1) { if (this.buyingList == null) { this.addDefaultEquipmentAndRecipies(75); } return this.buyingList; } //@Override //public void verifySellingItem(ItemStack stack) {} private void addDefaultEquipmentAndRecipies(int par1) { if (this.buyingList != null) { this.buying = MathHelper.sqrt_float(this.buyingList.size()) * 0.2F; } else { this.buying = 0.0F; } MerchantRecipeList rec = new MerchantRecipeList(); addRecipies(rec); if (this.buyingList == null) { this.buyingList = new MerchantRecipeList(); } for (int var3 = 0; var3 < par1 && var3 < rec.size(); ++var3) { this.buyingList.add((MerchantRecipe) rec.get(var3)); } } public abstract String mobName(); }
  8. Hi, I've build my mod many times and have never had this error before. After running gradlew build, my mod crashes the game on startup. There is no problem in my eclipse workspace, and the class the game crashed on is in fact in the correct path in the jar. Full crash report: ---- Minecraft Crash Report ---- // I just don't know what went wrong Time: 9/11/15 4:44 PM Description: There was a severe problem during mod loading that has caused the game to fail cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/divinerpg/entities/vanilla/EntityJackOMan at cpw.mods.fml.common.LoadController.transition(LoadController.java:163) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:559) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878) at net.minecraft.client.main.Main.main(SourceFile:148) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.NoClassDefFoundError: net/divinerpg/entities/vanilla/EntityJackOMan at net.divinerpg.utils.entities.VanillaEntityRegistry.init(VanillaEntityRegistry.java:114) at net.divinerpg.utils.proxies.CommonProxy.preInitServer(CommonProxy.java:141) at net.divinerpg.DivineRPG.preInit(DivineRPG.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556) ... 10 more Caused by: java.lang.ClassNotFoundException: net.divinerpg.entities.vanilla.EntityJackOMan at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 40 more Caused by: java.lang.NoClassDefFoundError: net/divinerpg/entities/base/EntityDivineRPGVillager at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ... 42 more Caused by: java.lang.ClassNotFoundException: net.divinerpg.entities.base.EntityDivineRPGVillager at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:101) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 46 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Mac OS X (x86_64) version 10.10.5 Java Version: 1.8.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 102598568 bytes (97 MB) / 307130368 bytes (292 MB) up to 8576565248 bytes (8179 MB) JVM Flags: 5 total; -Xmx8G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1448 Optifine OptiFine_1.7.10_HD_C1 6 mods loaded, 6 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCH FML{7.10.99.99} [Forge Mod Loader] (forge-1.7.10-10.13.4.1448-1.7.10.jar) UCH Forge{10.13.4.1448} [Minecraft Forge] (forge-1.7.10-10.13.4.1448-1.7.10.jar) UCE divinerpg{1.4.1-Pre} [DivineRPG] ([1.7.10][sMP]DivineRPG-1.4.1.jar) UCH DamageIndicatorsMod{3.2.0} [Damage Indicators] ([1.7.10]DamageIndicatorsMod-3.2.0.jar) UCH BetterFoliage{1.0.13} [better Foliage] (BetterFoliage-mc1.7-1.0.13.jar) GL info: ' Vendor: 'NVIDIA Corporation' Version: '2.1 NVIDIA-10.5.2 346.02.03f01' Renderer: 'NVIDIA GeForce GTX 960 OpenGL Engine'
  9. Yep, it was the update frequency. No idea how that happened... Thanks!
  10. Happens with all my mobs, not just the scaled-up ones.
  11. How is this different from how the Giant is scaled up in Vanilla?
  12. Hi, I've had this issue for a while and am not quite sure what the problem is. My mobs' animations seem a bit choppy, as seen here. The mob is just a scaled up ModelBiped. The Renderer class: public class RenderSizeable extends RenderLivingCreature { protected float scale; public RenderSizeable(ModelBase var1, float shadowsize, float scale, ResourceLocation texture) { super(var1, shadowsize * scale, texture); this.scale = scale; } public void preRenderScale(EntityMob var1, float var2) { GL11.glScalef(this.scale, this.scale, this.scale); } @Override protected void preRenderCallback(EntityLivingBase var1, float var2) { this.preRenderScale((EntityMob)var1, var2); } } Any idea what the issue might be?
  13. Never mind. I suppose this.posY-- was creating a client->server position difference.
  14. Hi, I'm creating a mob that's supposed to appear as a grass block until the player goes near it. However, this "illusion" is broken by the mob periodically bouncing up. Is there a way to prevent this? A video of the issue I'm having: http://gfycat.com/MeagerDentalBallpython Mob code: public class EntityKobblin extends EntityDivineRPGMob { public EntityKobblin(World par1World) { super(par1World); this.setSize(0.75F, 1F); } @Override public void entityInit() { super.entityInit(); this.dataWatcher.addObject(17, 0); this.dataWatcher.addObject(18, 0); } @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(net.divinerpg.entities.base.EntityStats.caveCrawlerHealth); this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(net.divinerpg.entities.base.EntityStats.caveCrawlerDamage); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(net.divinerpg.entities.base.EntityStats.caveCrawlerSpeed); this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(net.divinerpg.entities.base.EntityStats.caveCrawlerFollowRange); } @Override protected String getLivingSound() { return null; } @Override protected void playStepSound(int x, int y, int z, Block b) {} @Override protected String getHurtSound() { return Sounds.getSoundName(Sounds.kobblin); } @Override protected String getDeathSound() { return Sounds.getSoundName(Sounds.kobblin); } @Override public void onUpdate() { super.onUpdate(); if(!getProvoked()) { this.renderYawOffset=0; if(this.worldObj.getClosestVulnerablePlayerToEntity(this, 6) != null) this.setProvoked(); } if(!getGrounded()) { if(this.worldObj.getBlock((int) this.posX, MathHelper.floor_double(this.posY) - 1, (int) this.posZ) == Blocks.grass) { this.worldObj.setBlock((int)this.posX, MathHelper.floor_double(this.posY)-1, (int)this.posZ, Blocks.air); this.setGrounded(); this.posY--; } } } public boolean needsSpecialAI() { return true; } public boolean getGrounded() { return this.dataWatcher.getWatchableObjectInt(17)==1; } public boolean getProvoked() { return this.dataWatcher.getWatchableObjectInt(18)==1; } public void setGrounded() { this.dataWatcher.updateObject(17, 1); } public void setProvoked() { this.dataWatcher.updateObject(18, 1); addBasicAI(); addAttackingAI(); } @Override protected Item getDropItem() { return VanillaItemsOther.realmiteIngot; } @Override protected boolean isValidLightLevel() { return true; } @Override public boolean getCanSpawnHere() { return this.worldObj.getBlock((int)this.posX, MathHelper.floor_double(this.posY)-1, (int)this.posZ) == Blocks.grass && super.getCanSpawnHere(); } @Override public String mobName() { return "Kobblin"; } }
  15. Managed to get it working (at least clientside) with this.renderYawOffset=0 . Thanks!
  16. Hi, I'm creating a mob that I'd like to have "snapped" to the x/z grid when it isn't targeting a player (as in, it fills the space of a block perfectly). I'm not sure how to go about setting the rotation though. When I tried just calling this.setRotation(0, 0) in onUpdate, nothing happened. Does anyone know how to do this? Thanks.
  17. Worked perfectly, thanks! Out of curiosity, do you know what in the loading screen causes this?
  18. Well apparently this is caused by a Mac video driver glitch. Does anyone know if there's a fix?
  19. I've also tried the latest version, it had the same problem. I don't want to update to 1.8 quite yet. Just wasn't sure if I'd caused this.
  20. Hi, I recently updated my Forge workspace from build 1291 to build 1448. Before, all of my textures worked perfectly, but now many of my modded textures, as well as a lot of vanilla textures look completely broken. They seem to have the wrong texture coordinates. Note that all block textures seem fine, and all broken textures are items that are using parts of block textures. Does anyone know if this is somehow my fault, and if so, what do I do about it? Also, many of my block textures are 32x, in case this helps. I'd post code, but I'm not sure what you'd need since all of the blocks/items are registered normally. Thanks!
  21. Hi, I'd like to make some jungle mobs able to spawn on leaves, but I'm not sure how. SpawnerAnimals checks if the block below the mob being spawned has a solid top surface. Is there a way to let mobs spawn on leaves without making a coremod? Thanks!
  22. Hi, Is there a way to tell when the time changes from day to night? I'd like to add a chat message to all players. Thanks!
  23. Hi, I'm trying to get BOP compatible mob spawning working and am having some trouble. Here's my code: for (int i = 0; i < BiomeGenBase.getBiomeGenArray().length; i++) { BiomeGenBase biome = BiomeGenBase.getBiomeGenArray()[i]; if (biome != null){ if (BiomeDictionary.isBiomeOfType(biome, Type.END)) { EntityRegistry.addSpawn(EntityEnderSpider.class, 2, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityEnderTriplets.class, 1, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityEnderWatcher.class, 10, 4, 4, EnumCreatureType.monster, biome); } else if (BiomeDictionary.isBiomeOfType(biome, Type.NETHER)) { //EntityRegistry.addSpawn(EntityHellBat.class, 50, 1, 1, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityHellPig.class, 25, 5, 50, EnumCreatureType.creature, biome); EntityRegistry.addSpawn(EntityHellSpider.class, 50, 1, 1, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityScorcher.class, 7, 4, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityWildfire.class, 50, 1, 1, EnumCreatureType.monster, biome); } else if(BiomeDictionary.isBiomeRegistered(biome)) { if (BiomeDictionary.isBiomeOfType(biome, Type.SNOWY)) { EntityRegistry.addSpawn(EntityGlacon.class, 30, 1, 1, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityFrost.class, 50, 1, 4, EnumCreatureType.monster, biome); } if (BiomeDictionary.isBiomeOfType(biome, Type.SANDY)) { EntityRegistry.addSpawn(EntityDesertCrawler.class, 50, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityAridWarrior.class, 35, 1, 4, EnumCreatureType.monster, biome); } if (BiomeDictionary.isBiomeOfType(biome, Type.OCEAN)) { EntityRegistry.addSpawn(EntityWhale.class, 1, 1, 1, EnumCreatureType.waterCreature, biome); EntityRegistry.addSpawn(EntityShark.class, 1, 1, 1, EnumCreatureType.waterCreature, biome); } if (BiomeDictionary.isBiomeOfType(biome, Type.BEACH)) { EntityRegistry.addSpawn(EntityCrab.class, 100, 4, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityKingCrab.class, 40, 4, 4, EnumCreatureType.monster, biome); } if (BiomeDictionary.isBiomeOfType(biome, Type.JUNGLE)) { EntityRegistry.addSpawn(EntityJungleBat.class, 50, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityJungleDramcryx.class, 70, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityJungleSpider.class, 40, 1, 4, EnumCreatureType.monster, biome); } EntityRegistry.addSpawn(EntityCyclops.class, 2, 2, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityMiner.class, 1, 1, 1, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityJackOMan.class, 1, 1, 1, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityCaveCrawler.class, 50, 2, 3, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityRotatick.class, 50, 3, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityEnthralledDramcryx.class, 50, 3, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityTheEye.class, 20, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityCaveclops.class, 50, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityEnderSpider.class, 2, 1, 4, EnumCreatureType.monster, biome); EntityRegistry.addSpawn(EntityRainbour.class, 2, 1, 1, EnumCreatureType.ambient, biome); } } } I need to check if the biome only appears in the overworld somehow, since this is a dimension mod and I'd like it to be compatible with other dimension mods. However, BiomeDictionary has a makeBestGuess method, so BiomeDictionary.isBiomeRegistered(biome) is always true since the biomes are being registered with makeBestGuess . Does anyone know of a good alternative? Thanks!
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.