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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. FileNotFoundExceptions mean that the file....was not found
  2. // Tried this but error occured public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL); Of course it failed. 1) That property does not match BlockHorizontal.FACING, it's a completely different property. It just happens to have the same name and same values. Don't just create properties willy nilly, use a reference to the original. public static final PropertyDirection FACING = BlockHorizontal.FACING; magic. 2) Dispensers don't use horizontal facing, they use omnidirectional facing: that is, they can face UP and DOWN too.
  3. Ok, so, one, that tutorial is out of date Two, that tutorial does some awful, awful things. Show your main class.
  4. Then you probably need to go learn Java. This forum is not Java school, you are expected to have a certain level of understanding of OOP before posting here.
  5. Yes. Good job. Tell the moderator the rules.
  6. You see where it says = new Thing()? Remove = new Thing()
  7. Any time the TE data changes and you want to update the client, call these methods: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L95-L98 And have these methods overridden https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L174-L189
  8. Block are registered before items. Therefor this line: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/proxy/CommonProxy.java#L87 Runs before this line: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/proxy/CommonProxy.java#L70 Which means that this line: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/blocks/CopperOre.java#L32 Assigns the CURRENT VALUE of the field (which has not yet had the ObjectHolder annotation run to inject a value) to the block's field. Also: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/ModItems.java#L36 Seriously? NO, BAD MODDER. DO NOT ASSIGN THESE FIELDS MANUALLY. ESPECIALLY NOT WITH A SEPARATE INSTANCE
  9. Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Expected name at line 19 column 6 path $.variants
  10. Look at BlockLogsOld and BlockLogsNew
  11. You should not be doing this.
  12. The parameter to BlockStateContainer's constructor already takes an IProperty[] array, so use array operation magic.
  13. new BlockStateContainer({ A, B, C, D, E, F, G, H, I, J, K, L})
  14. Caused by: java.io.FileNotFoundException: poverhaul:models/block/camp_fire.json
  15. By "inefficient" you mean "built into the TE class all you have to do is override three methods" right? One of which is literally called getUpdateTag and returns an NBTTagCompound
  16. 4) In that case, IBattery should extend IChargable or you have to interfaces IChargable and IDrainalbe (or whatever) and a battery just implements both. But in any case, you should really learn to use capabilities. It really isn't that difficult. This is pretty much all you need: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/api/capability/RawMechanicalPowerHandler.java Only instead of IMechanicalPower you'll use whatever the interface is that Forge supplies for Energy. You'd then set up some kind of object for the energy storage (look at the ItemStackHandler for inspiration on how to handle it) and then supply that object instance via getCapability. You might need this, I'm not sure: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/api/capability/SimpleCapabilityProvider.java
  17. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L174-L189
  18. Thing I noticed as I was perusing your code to see what it does: 1) Why are you asking an item stack what the charge time is when sending energy to a TE? https://github.com/44tim44/BetterThanElectricity_1.12.2/blob/master/src/main/java/se/sst_55t/betterthanelectricity/block/solarpanel/TileEntitySolarPanel.java#L62 2) Why are you allowing for a null item stack? Item stacks are never null in 1.12 https://github.com/44tim44/BetterThanElectricity_1.12.2/blob/master/src/main/java/se/sst_55t/betterthanelectricity/block/solarpanel/TileEntitySolarPanel.java#L85 3) Not that getItemChargeTime gives a shit about the item passed to it anyway... 4) Why is IBattery not an IChargable? https://github.com/44tim44/BetterThanElectricity_1.12.2/blob/master/src/main/java/se/sst_55t/betterthanelectricity/block/solarpanel/TileEntitySolarPanel.java#L36 These two interfaces even supply the same method: https://github.com/44tim44/BetterThanElectricity_1.12.2/blob/master/src/main/java/se/sst_55t/betterthanelectricity/block/solarpanel/TileEntitySolarPanel.java#L45-L51 5) Why are you using Interfaces at all? This is why capabilities exist. Forge has even supplied a capability definition for Energy. 6) This else return false is extraneous. https://github.com/44tim44/BetterThanElectricity_1.12.2/blob/master/src/main/java/se/sst_55t/betterthanelectricity/block/solarpanel/TileEntitySolarPanel.java#L121 7) This boolean does nothing https://github.com/44tim44/BetterThanElectricity_1.12.2/blob/master/src/main/java/se/sst_55t/betterthanelectricity/block/solarpanel/TileEntitySolarPanel.java#L42
  19. Ok, I misread at first. I thought you said you couldn't see the value updating. One minute...
  20. My immediate guess is that you are synchronizing the value to the client.
  21. Let me break this down for you: The server is responsible for EVERYTHING except rendering and user input. The client is responsible for rendering and user input. Which side would it make sense to do things on?
  22. Either: A) I don't understand the question or B) That's only a question you can answer. What side do you WANT to add/set/get/remove energy?
  23. Hmm. My mental model must be out of date. I just checked and I'm running stuff through my proxy as well. Never mind.
  24. That's what new topics are for. That are "trying it and seeing." But yes.

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.