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

Eternaldoom

Forge Modder
  • Posts

    592
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    California
  • Personal Text
    Lead developer of DivineRPG.

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Eternaldoom's Achievements

Dragon Slayer

Dragon Slayer (6/8)

110

Reputation

  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"; } }
×
×
  • Create New...

Important Information

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