Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

sequituri

Forge Modder
  • Joined

  • Last visited

Everything posted by sequituri

  1. Just to see if my project could use some new java features - iterfaces with default methods, method references in lambdas, and such, I set the sourceCompatibility and targetCompatibility = 8 in my build.gradle and tried to build. The build failed and the error is here: (I snipped away the successful stuff) It appears that org.ow2.asm.4x is not compatible with java 8 for the :reObf task to complete properly. There is a 5.0 and 5.0.1 version available that would solve this issue, but I could not figure out how to make gradle use it. Is this a future enhancement, or will Forge always be stuck at 1.6 compatibility?
  2. derp! I just realized that despite the similarity of names, TileEntities do not inherit from Entity in any way. I also just figured out that an Entity (like EntityMinecartChest) can move but a TileEntity (like TileEntityChest) cannot. I wonder if that is the only difference, since both can have inventories and additional data and NBT's. I would be nice to be able to learn all this on the Wiki...
  3. The Hopper uses a method that looks somewhat reasonable for finding nearby TEs. world.getEntitiesWithinAABBExcludingEntity((Entity)null, AxisAlignedBB.getAABBPool().getAABB(xPos, yPos, zPos, xPos + 1.0D, yPos + 1.0D, zPos + 1.0D), IEntitySelector.selectInventories); The first argument is the entity to exclude - don't want to include oneself. The last one filters by EntityTypes. It would be nice to know if this is one of the better (faster) methods.
  4. So, show us what you've tried so far.
  5. Have you tried overriding setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) ? Take a look at the override of this method in BlockAnvil.class for an idea how to do it. But use your own metadata states.
  6. You really are using superfluous loops for no good reason here. for(int y = 0; y < items[ i ].stackSize; y++){ flowering++; } flowering += items[ i ].stackSize; does the same thing with one instruction.
  7. You didn't happen to notice that part of your copied code sets the metadata in the range [2,5] and the rest sets the metadata in the range [0,3]? You really need to decide if you are encoding the facing direction as in 0==north, 1==west... etc. or are you encoding it as a an unencoded direction (as in 0=down, 1=up, 2=north.. etc). You really cannot code it both ways.
  8. Why are you testing this tag: if (item.stackTagCompound.getTag("ench") != null) and then using this other tag as if you know its contents are non-null: enchants = (NBTTagList) item.stackTagCompound.getTag("StoredEnchantments") ? The "ench" tag is not the same tag as the "StoredEnchantments" tag. Why not test the tag you are actually setting enchants to?
  9. Did you check that EntityAnimal actually has the attributes: this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(10.0D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.3D); that you are trying to set values on? I'm guessing it doesn't and that is causing your NPE.
  10. This code might save a few bytes of space. But, I haven't tested it, so use as your own risk.
  11. I'll give you the answer that someone else on the forum gave a couple days ago: Use getIconFromSideAndMetadata for your furnace block. If side == 0 and metadata == 0, return the icon for side 2 Of course, this assumes your storing your orientation in metadata like the vanilla furnace does. Because, furnaces are never oriented to side 0 or 1 (top of bottom side), so it's safe to assume the item is still in inventory.
  12. If you are running Java 8 then you'll want to get the newest Forge (1049) from the Files section. LexManos explains that it works with Java 8 because of the FernFLower fix he made. If you aren't using Java 8, then IDK what's wrong, and I can't help you.
  13. In 1.7.x, you can use the method setHarvestLevel("axe",n) and setHarvestLevel("pickaxe",m), and so on. Derive from itemTool for a start or the main type of tool it is. Or you could derive from ItemSword and just add in the toolClass settings. There is more to make it all work than just that, but it should get you started.
  14. I just found this, so it may already have been tried and failed... There is a MinecraftForge event called WorldEvent.PotentialSpawns that can be handled and will allow the spawnlist to be set to any spawnlist desired (added to, or removed from). That might make your creature spawn wherever you want. I have not tested this theory, so it's up to you.
  15. This is probably handled with events now. For instance, there is the getModdedBiomeGenerators(WorldType wtype, long seed, GenLayer[] original) that fires WorldTypeEvent.InitBiomeGens event on TERRAIN_GEN_BUS, that allows new biomegenerators to be added/removed.
  16. The subject of this thread is way off. There is no Forge for 1.7.4. Also, your code new WorldGenMinable(MobOres.creeptoniteOre, 5)). says you only want 5 attempts to place your ore in a vein. That is not a very large number if you want to find your ore easily.
  17. I have nothing against your plan for these respawning ores and trees, but just a word of caution. TileEntities that tick (which I presume these would) eventually lead to lag in larger quantities. If you don't mind a little slowdown, then press on.
  18. I've heard that cleanCache is the switch to make it clean out the cache and start over.
  19. I went looking for the spawn code for different creatureTypes and I discovered the possible problem you are encountering getting your creatureType to spawn. Check this code in BiomeGenBase: public List getSpawnableList(EnumCreatureType par1EnumCreatureType) { return par1EnumCreatureType == EnumCreatureType.monster ? this.spawnableMonsterList : (par1EnumCreatureType == EnumCreatureType.creature ? this.spawnableCreatureList : (par1EnumCreatureType == EnumCreatureType.waterCreature ? this.spawnableWaterCreatureList : (par1EnumCreatureType == EnumCreatureType.ambient ? this.spawnableCaveCreatureList : null))); } Apparently it is not smart enough to support spawning custom CreatureTypes. This makes is hard to accomplish what you want short of using ASM and changing the method. On the other hand, if you used a standard creature type from the list then it should spawn nicely.
  20. Which biomes did you set them to spawn in? You might need to find such a biome and spend some time there looking around. I had a similar issue when horses were added, for I did not know they only spawned in plains and such.
  21. oops! The error is in EnumHelper and it's incorrect signature for EnumCreatureType (both the addCreatureType method, and the commonTypes grid.)
  22. ItemFood (porkchops) heals the dog/wolf when he is tamed. Items.bone (from skeletons) can tame the wolf (with some random chance) unless he is angry. isBreedingTime returns true if the item passed in is the wolfsFavoriteMeat (property held by an ItemFood: like porkChop) Most of the otherstuff is pretty standard tameable methodology. I don't know where the follow player code come into play.
  23. Please post your EntityNeola class. The classloader seems to be having trouble loading it. Or there is another problem.
  24. Look at what diesieben07 said after studying the CraftinManager, he give you the informative piece. For the rest, it's just simple java, searching a list and calling remove() on the one you want.
  25. Start by looking at the class CraftingManager and seeing if you can understand how it works. Then, you can write the code to do what you want.

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.