Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

IntentScarab

Members
  • Content Count

    18
  • Joined

  • Last visited

Everything posted by IntentScarab

  1. For future reference, this is the code I added to make it work: BlockState state = world.getBlockState(this.pos); world.notifyBlockUpdate(this.pos, state, state, 2); I added this to the end of my tick() method and it works.
  2. That worked!! One simple line and it worked. The update to the block state is in MBE, but I didn't think it pertained to me cause it was dealing with the faces of the block with fuel burning. Omg thank you so much. Here, since I have you could I have some help on the same sort of problem? The item I have uses the durability bar to show how full it is, when it is getting the exp taken out of it the bar doesn't update. How would I update the durability bar of the item to go down as the amount decreases? Right now I have to right click on it and it tells me it is empty.
  3. Are you using the new mappings? If you are then it's prob under a different name.
  4. Ingredient#fromItems or Ingredient#fromStacks I think is what you're looking for?
  5. Ahh okay, so it's server side usually but when the gui is opened it's client side, I'm guessing? I'm sorry, but I still don't understand how changing the data on the TE by the TE doesn't result in any change with the data. I'm reading through the code from MBE and there isn't something super obvious that I'm missing... The only big change is that I pass my tile to the container, and they don't markDirty after modifying their furnaceStateData; they only do it on items being moved from one slot to the other from what I can see. This is the MBE topic I'm using as reference btw.
  6. Is the TileEntity on the Server or Client side? Cause that's what I'm using here. I am making changes to an object that holds the data I need, kinda like how MBE does it. But I'm doing this through the tick method of the Tile. I look at the debugger and it says that the object has the amount of exp from the book, book has none, then when I try to get the exp out of the block using the buttons then it tells me I haven't got any exp in the block. Am I missing something here?
  7. TIL, and that's on me for being thoughtless on that part. Though I think I fixed that. If I'm making changes on the server only then why doesn't it "save" the changes?
  8. Hello, The title is a bit confusing, I know, but I'll explain more here. I've been following MinecraftByExample's tutorial on a Furnace type block, since that is how my block kind of works. It has an object that holds the information about the block such as time, and what I have been using it for, experience points. Now I have this block that holds exp and has two inputs, an output, and four buttons. The buttons are working and doing what I want; when I click a button, the Container deals with the logic then sends the updated data to the TileEntity for it to be changed. I originally
  9. I've been coding for like four years and it seems like I still don't know what it means. I'm gonna research what it means now cause it's been too long 😅 I've took off the static property and commented out all the code that was complaining for the meantime. That has cleared up the problem about the error showing. Thank you for the help!!
  10. Sweet, made those changes now, thank you https://github.com/RhysGrabany/Experienced Here you go, the changes I've made rn are under the tile_passing branch
  11. So I should delete the DeferredRegisters in the Registration class and just keep them separate in their respective classes? So ModItems gets the DeferrefRegister and so on? I did notice that when I changed in ModTiles from the DeferredRegister in Registration to the specific class DefReg it actually registered, so that explains something to me. This is my ExperienceBlockTile constructor and the getTier method that returns the Tile: public ExperienceBlockTile(ExperienceBlock.Tier tier) { super(getTier(tier)); inputContents = ExperienceBlockContent
  12. I have a block that has four different tiers (SMALL, MEDIUM, LARGE, CREATIVE), I had everything working but then I wanted to send the tier of block down the pipeline to the container where it can be used, so I'm sending the tile down. The Tile accepts the Tier as a value to pass to its constructor, but for some reason I get an error in the console when I place any of this block that is not the CreativeTier. So if I place a Small/Medium/Large block then I get this error: I've searched on here and I get not much to go on. And when I step through with the debugger, all the Til
  13. I was thinking, have the Recipe type and put the recipe for the item as (Item Input) -> (Item Output), and put the timeTaken as some arbitrary number like 0/60. Then when I actually put the item in, it checks if it has the NBT tag and then give it a custom timeTaken based on how full it is. That way a half full item won't take as long as a completely full item. And if the item doesnt have the tag, then it will check if there is a recipe that uses it and it will have the correct timeTaken. I don't know if this is the best way tbh, this is just me thinking based on what I know so
  14. I have a few questions about recipes, or my options for what I want, and I want to ask them before I start implementing code. I have a block that holds experience, and there is an input and output. Currently I just have a book that holds experience as an NBT tag. But in the future I want to fill a bottle with experience for other uses. Right now I look to see if the tag is present and then take the exp from it, but this doesn't work for what I want in the future. Should I make a Recipe type for this block -- but my question here is how can I use the nbt data of the item a
  15. That's me being stupid and not thinking stuff through. That actually fixed it tho, so thank you very much. Updated code in case someone in the future needs it: public class SingleMinusButton extends Button { private static final ResourceLocation BACKGROUND_TEXTURE = new ResourceLocation(Constants.MOD_ID, "textures/gui/experience_block_gui.png"); public SingleMinusButton(int x, int y, ITextComponent title, IPressable pressedAction) { super(x, y, 11, 11, title, pressedAction); } @Override public void renderButton(MatrixStack matrixStack, int
  16. Hello, I am having a problem with creating a button for my gui. The button actually does get created and gets added to the screen, the problem is that it has no texture. I have double-triple checked the coords of the texture from my file, and I've looked at other modders code and I'm not seeing what they have done that I haven't relating to this issue. The BlockScreen code: public class ExperienceBlockScreen extends ContainerScreen<BaseContainer> { private static final ResourceLocation BACKGROUND_TEXTURE = new ResourceLocation(Constants.MOD_ID, "text
  17. Oh wow, that worked. Thank you very much I have another issue with the durability bar, but I'll work on that for a while before asking the forum. Thanks again!
  18. Hello, I am trying to create an item that holds experience, later it will be blocks but little steps, and when I move the experience from the Player into the book, the exp bar doesn't update. Right now I have this: playerIn.experienceTotal -= expToStore; And the next time I use the Experience Book it does say that I don't have any experience left, just that the bar doesn't update. I've tried looking at the Enchanting Table Block/Tile Entity/Container, and from what I've seen they mark the inventory dirty when using the player experience, so I added this: player
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.