Skip 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.

Animefan8888

Forge Modder
  • Joined

  • Last visited

Everything posted by Animefan8888

  1. Hence using a Set<Pair> - just store one instance of each (X,Z) pair. But you're right - you'd need to store a Y-value as well; so perhaps a Map<Pair<Integer,Integer>, Integer> would be better, where the key is (X,Z) and the value is Y. As for which Y-value, that's up to the mod developer; the smallest Y would be a reasonable choice. Why not just create a list of BlockPos? It already stores x, y, z and it is given to you in that form? Or heck you could do a Map of <BlockPos, IBlockState> and then iterate through them and spawn them with that information.
  2. That wont work because theny position is not identifable. Explain please? Seems totally workable to me. Two things multiple blocks on the same x and z coord, and second how would I even find the correct y coord. Would it be at the highest possible y position there is a block or would it be at the first block with air above them.
  3. Yep. Hence why I suggested a Set<Pair<Integer,Integer>> as the appropriate data structure here; a unique set of (x,z) positions from which columns can be traced vertically upwards. OP needs to be paying attention That wont work because theny position is not identifable.
  4. You have not followed any of desht's advice, and you should be using the sub event of ExplosionEvent.Start
  5. ItemStackHandler itemHandler = new ItemstackHandler(size); @Override public boolean hasCapability(Capability capability, EnumFacing facing) { return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY ? true : super.hasCapability(capability, facing); } @Override public Capability getCapability(Capability capability, EnumFacing facing) { return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY : itemHandler ? super.getCapability(capability, facing); }
  6. Pretty much. You might need to create a custom implementation of IItemHandlerModifiable instead of using the default one provided (ItemStackHandler).
  7. In your TE override getCapability(Capability, EnumFacing) and hasCapability(Capability, EnumFacing). return an instance of IItemHandlerModifiable. IE if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY /* Something with EnumFacing here if you want */) return itemHander;
  8. Post your TE code.
  9. Make it happen when attack target is set or create a boolean value that changes when it is null and is not null.
  10. Along the lines of this (taken from EntityZombie.class) this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).applyModifier(new AttributeModifier("Random spawn bonus", this.rand.nextGaussian() * 0.05D, 1));
  11. When your mob has a target ie getAttackTarget() !=null set the speed.
  12. Under the Support & Bugs thread (or similar). And it would be under .minecraft/crash-reports
  13. First off there is no crash report there and second this is wrong part of the forum.
  14. You may be able to do this with Block#eventReceived(...) otherwise the answer is you can only determine what type of piston interaction it has.
  15. Yes, but that gets quite long and gets harder to find certain blocks. And then you have to specifically register them one by one instead of in mass, by I digress. We are "arguing" opinions not much of a reason to do that.
  16. I can definately agree with what you are saying, but having an Interface such as I"Modid"Block that has custom methods such as createCustomStateMapper. Or even just include them in the base block class.
  17. For being able to reference your stuff later, using an array isn't a good idea. The only time you'd want it is if you were doing something with the whole collection. Which a number of folks have done for their item registration, but you'd still have the public static properties. Yes, agreed you could also use a Reflection way to register IE loop through all of your fields and all instances of Block you register as a Block and all instances of Item you register as an Item.
  18. All of that looks good, now you just need to implement it into your TE. I give you luck on your endeavor of limiting your two input slots as it can be quite the process. And if you need any source of how to do the smelting I definitely recommend looking at the vanilla furnace as it should give you some insight.
  19. Yes if you want just the output return something like recipe.getOutput(). (Returns an ItemStack) If you want it to return the whole recipe you are fine, assuming your ItemUtil.areItemsEqual() method works.
  20. What I like to do is add them to a List in a base classes constructor. Then loop through it for registry and model binding. Check out episode 1 or 2 of my tutorials for an example.
  21. You pass it to the Wrapper and if the inputs are the same get the output that was passed into the constructor. IE what your third stack was.
  22. What are you referring to? Passing two ItemStacks into the constructor? Yes. His wrapper object currently also contains the output, which makes it hard to construct a search-object from two arbitrary inputs and locate the output. He is using a list of his wrapper, there would be no way for him to find the output from that.
  23. What are you referring to? Passing two ItemStacks into the constructor?
  24. No keep the ItemStacks add a new instance to your list, your list should ask for your wrapper.

Important Information

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

Account

Navigation

Search

Search

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.