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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. Explanation on why it's multiplication: In order to store both of these: Red, Green, Blue, White North, South, East, West You get a list that looks like this: Red+North Red+South Red+East Red+West Green+North Greeen+South Green+East Green+West ...
  2. Ahem... this is the same as just blockIn . Actually, no, that does not even compile. You are correct. I just blindly copied the half he already had in order to beat him with the stupid stick of "how to check if something is equal."
  3. No, that would prevent all motion. You need to copy the existing onUpdate method and remove the alterations it makes to motionY to account for gravity.
  4. Take a look at the EnumToolMaterial class and see if you can figure it out.
  5. 1) Extend EntityArrow and override is onUpdate method 2) Should be an event for it, check the Bow class, if not you could wait for an EntityConstructed event, if it's an arrow, and the owner/firer is the player and the equipped bow has the enchantment, replace the entity being constructed. 3) Probably? You'd have to migrate all of the onUpdate code to a separate function, then in onUpdate call that function until the arrow collides with something 4) See #1, #2
  6. blockIn.getBlockState().getBlock() Wait for it == Drum roll please! Blocks.FIRE
  7. If you don't move your lightsource very often, you cut down on lighting updates. That's why the light effect in Artifacts only moves it when the light level drops below 10 at the player's current position.
  8. Your Forge directory. You know. Like how you ran gradle setupDevWorkspace and gradle eclipse
  9. If you used a vanilla texture, you don't need the modID (it defaults to "minecraft:")
  10. myThing.setUnlocalizedName(myThing.getRegistryName()); //magic
  11. As I said, I haven't done performance checks on it in a long time. I'm not even actively developing that mod any more.
  12. Mainly player.hasCapability(PlayerProvider.PLAYER_CAPABILITY, null) So you don't have to do stupid isntanceof checks or null checks. If it does not have the capability, don't try to get it.
  13. I haven't measured the performance impact lately. Here's my light block: https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/block/BlockLight.java (extends https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/block/IInvisibleBlock.java )
  14. Alternatively, like this https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/components/ComponentLight.java (Don't mind the class not actually being an Item, it uses the same methods).
  15. I suppose it could be an enum. It has the look of being an Item object, though.
  16. This right here is super clever: setUnlocalizedName(Reference.TestItems.INFUSED_LEGGINGS.getUnlocalizedName()); setRegistryName(Reference.TestItems.INFUSED_LEGGINGS.getRegistryName()); (Hint: no it's not, does not do what you want it do to,* and in fact is just going to crash the game)
  17. Your model does not have a parent. You should specify one (e.g. "parent": "blocks/block") as that will give you several parameters that your model is missing (such as display rotations). Your blockstate file also does not have an inventory or normal variant.
  18. No, you don't understand. Cauldron is so dead, it is not being developed any more, not even for 1.7.10.
  19. You become invincible at 25 points of armor, because each point of armor is an additive 4% damage reduction. Do the math.
  20. Hmm. If only Forge had a way to view the original Minecraft source code.... OH WAIT IT DOES /** * Holds the maximum damage factor (each piece multiply this by it's own value) of the material, this is the * item damage (how much can absorb before breaks) */ private final int maxDamageFactor; /** * Holds the damage reduction (each 1 points is half a shield on gui) of each piece of armor (helmet, plate, * legs and boots) */ private final int[] damageReductionAmountArray; /** Return the enchantability factor of the material */ private final int enchantability; private ArmorMaterial(String p_i47117_3_, int p_i47117_4_, int[] p_i47117_5_, int p_i47117_6_, SoundEvent p_i47117_7_, float p_i47117_8_) { this.name = p_i47117_3_; this.maxDamageFactor = p_i47117_4_; this.damageReductionAmountArray = p_i47117_5_; this.enchantability = p_i47117_6_; this.soundEvent = p_i47117_7_; this.toughness = p_i47117_8_; } /** * Return the damage reduction (each 1 point is a half a shield on gui) of the piece index passed (0 = helmet, 1 * = plate, 2 = legs and 3 = boots) */ public int getDamageReductionAmount(EntityEquipmentSlot armorType) { return this.damageReductionAmountArray[armorType.getIndex()]; }
  21. You know there is a PlayerContainerEvent that is fired whenever the player opens (or closes) a gui related to a container (of which the GuiMerchant is) as well as the GuiOpenEvent when ever the player....opens a gui (which the GuiMerchant is).
  22. Your blockstate file does not have a "normal" variant.

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.