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. Yeah, and your problem is somewhere in like 12 different files. We need all of those so we can run your code ourselves.
  2. Good job, using a 1.9 tutorial for 1.11
  3. This is something I learned when reading up on 1.10, but yeah. Fixed that not that long ago too... Hmm...I'll have to check. Well bugger. This will keep me on my toes in the future, for sure. You have to call that method for items too. Yes, even items that are the item representation of your block.
  4. I...never thought about this before. Huh. Good to know. (Now to go fix my own usage...)
  5. Also: Why does the "registry" name have capital letters in it? Why isn't your unlocalized name based off the registry name? someBlock.setUnlocalizedName(someBlock.getRegistryName());
  6. Ew. That if-else block. Yuck. return new ResourceLocation("Civilian" + id + ".png"); //magic Also, the reason it isn't random is because the XOR operation isn't random. You're much more likely to get particular values than others. When I did something like this, I used a Mersenne twister. Nothing else got me close. https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/hazards/block/BlockUnstableStone.java#L175-L180
  7. http://bfy.tw/B3h4
  8. And that's not how you link images. Jesus. AND!!! You didn't expand the models/block directory. Fuck. Also, open the start menu and type "snip." Use that program instead of your phone next time.
  9. A solid understanding of an object oriented language is enough, really. Be that C#, Java, or something else. As long as you can work out what code to write in a language it's easy to figure out how to translate that into the language you're working in.
  10. Show us a screenshot, so we can see the folder path.
  11. And does that file have the proper file name (all lower case)
  12. You know that /gamemode 0 exists, right?
  13. No. It is not. It is not supposed to drop anything. Creative mode literally bypasses all harvestblock code.
  14. You don't need this chunk unless you're using different values than item/generated
  15. On your newest code.... You are comparing ItemStack instances using == which will never work. Except that what you are comparing is the return of block.getItem(world, pos, state) with the return of block.getItem(world, pos, state) (i.e.. itself) which will always be true.
  16. The "no code talk" is because I didn't want to know about your attempted approach but your desired outcome in order to avoid an XY Problem. Anyway, there's some stuff on this forum from people doing similar things. Camouflage blocks, etc.
  17. It's not an NBT block. NBT has nothing to do with it. It's a TileEntity. The TileEntity stores the state that is appropriate for being rendered, and the model (or TESR) reads that state in order to display. There's a way to do this using a custom IBakedModel class, but I'm only aware of the broad strokes.
  18. Look at vanilla blocks, like stairs or glass, to see what they do.
  19. What is your goal? What are you trying to make happen? Do not talk code.
  20. Ok, this is like 4000 times more complicated than you think.Trust me, I did it. The "can snow" boolean is basically garbage and controls nothing AFAICT. Snow is entirely governed by whether or not precipitation (rain) is allowed, the biome's temperature, and the Y level of the block (mountains are colder at the top). You want seasons? You need to create a way to determine the date from the totalWorldTime, adjust the biome temperature and rainfall values as necessary (AND ON THE CLIENT), deal with chunk-border update problems (if no blocks change the grass color doesn't update), and let vanilla rain/snow stuff take over from there. It's a bitch. It doesn't work very well, I had to do some really hackish things (in 1.7) that I'm not proud of, and getting ice to melt and prevent permanently freezing the ocean is basically impossible.
  21. Yeah, setting up on a 32 bit OS is dicey at best. I managed it once having to continuously tweak the ram allocation up and down by increments until it worked (there's two different errors: one says it couldn't allocate the RAM, and you go down in MB, the other said it ran out of heap and you go up in MB).
  22. To me it looks like you need to allocate more RAM to the decompile process or you may need more RAM in your machine. (it looks like it gave up after trying to allocate more than ~3GB). You can also try telling it to use less RAM (in the event that you don't have 3GB available in your machine and can't add any: e.g. a 32 bit OS).
  23. It's....not something you should be calling in most circumstances. However, for this purpose, this is the only method available for what you're doing.

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.