Jump to content

AngheloAlf

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by AngheloAlf

  1. I think I fixed most of this things. I based myself in the repo from @Cadiboo, and reading a lot the forge docs. One last thing. While moving and deleting a lot of code, I just realized that I weren't registering recipes. How should I register them? Thanks a lot you both!
  2. So, what are the proper events that I should use? Ok, I will look how to change this. So, should I delete this whole class? In the base block I implement a lot of functionality and logic that is used in all of my blocks, and even I decleare some abstracts methods for this, so I dont see why I should have all of that methods code repeated in all the classes. If made in this way, if I find a bug that it is common in all the blocks, I have to change only one class, not 7. I don't know what are you saying here. How do I set the resource domain there? Basically, this is what happens when you follow like three differents tutorials on how to make a minecraft mod. I just don't know what are the correct way to do the forge stuff. When I got the blocks showing in game, i barely touch this part of the mod, because I don't understand it. How should I structure my mod, the blocks registry and all of the forge stuff? Thanks a lot for the feedback!
  3. Hi. I was looking at the logger while the game was loading, and I saw an exception like this: I am getting a lot of exceptions like that, but for some reason the game do not crash and loads fine. The mod works fine too. My question is, why am I getting this exception? What is this "#inventory" thing? And why it reports the error in "minecraft:halfadder_block#inventory" and not "my_modid:halfadder_block#inventory"? I think is not a registering block problem, because i have already find and fixed an exception where it shows the correct modid. The exception was: Note it shows "alf_logic_gates:halfadder_block#block_state" (shows the correct modid). How can i fix the incorrect modid? (minecraft: instead of alf_logic_gates:) How can i fix the #inventory exception? My github repo is here. Thanks a lot for your time.
  4. Hi I added an IMessage to notify the server: My new problem is, how do I access the corresponding tile entity from the IMessageHandler::onMessage method? Thanks a lot.
  5. Hi! I made a redstone clock. It emits redstone signal by a period of time, and then go off, then on and so on. I want the clocking period to be changable in game, so I tried to make a GUI. In the GUI, is a button '+' and a button '-', they change the max number the block has to wait until changing its state. But, for some reason, the game is not updating to this, the frecuency is the same. What am I doing wrong? Code: The github repo is here. Thanks for your time.
  6. Thanks a lot! This fixed my problem. What I did was add Block#notifyNeighborsOfStateChange into the update() method of my tile entity, just like this: @Override public void update(){ counter -= lastCount * 4; if (counter <= 0) { lit = !lit; counter = 400; markDirty(); world.notifyNeighborsOfStateChange(getPos(), blockType, false); } } I have one doubt remaining, what is the third argument (the boolean) of Block#notifyNeighborsOfStateChange supposed to mean? I put there a false, but I don't know what will change if I put true there. Oh, and i just noticed that I forgot to put a title to my post. Ups. Is there a way to change it?? Thanks a lot again!
  7. Thanks a lot! This fixed my problem. What I did was add Block#notifyNeighborsOfStateChange into the update() method of my tile entity, just like this: @Override public void update(){ counter -= lastCount * 4; if (counter <= 0) { lit = !lit; counter = 400; markDirty(); world.notifyNeighborsOfStateChange(getPos(), blockType, false); } } I have one doubt remaining, what is the third argument (the boolean) of Block#notifyNeighborsOfStateChange supposed to mean? I put there a false, but I don't know what will change if I put true there. Oh, and i just noticed that I forgot to put a title to my post. Ups. Is there a way to change it?? Thanks a lot again!
  8. Hi. It's me again. I'm trying to make a block that outputs redstone on and off by a self timer. The block is on for X ticks, and then is off by X ticks, and repeat (a clock). It kinda works... The value inside the tile entity changes, but the output signal doesn't changes (neither the texture). Code is here. The problem is related with `blocks.LogicClock_Block.java` and `blocks.datablock.ClockEntity.java`. I suspect there is a method that I am not overriding, but I don't know what it is... Thanks ?
  9. Somehow this fixed the issue. I don't know how the other solution didn't work. Thanks a lot for the help!
  10. I tried this when @supercat765 said it, but the bug still persists, and even this add a new bug, the textures not changing when right-clicking the block. Emm, what?
  11. Well, this didn't work. And this breaks the textures changing. Any other ideas?
  12. Edit: The problem was that i didn't override the method Block#getActualState. --------------------------------- Original post: Hi. I'm trying to make a logic block. Some sides of the block will be the input and a face will be the output. The input faces can be changed with a right-click on the cube, for example the initial state will be 'inputs from left and behind the block', and with a right click the state will change to 'inputs from left and right the block'. This is stored as an integer in a tile entity. It also changes texture for every state. Everything works fine, except when I exit the game and enter again. When I enter the game and load the world, the block shows as the default state, and not the state from the tile entity. But if the block get right-clicked, it goes into the state it should go as if nothing happend. For example, the default state is 0 (and the max is 3). I log out when the block is in state 2. When I enter, the block shows as state 0, but if I right-click it, it goes to state 3. My code is here. My problem is related with the `blocks/base_blocks/LogicBlock` class and `blocks/datablock/LogicTileEntity` class. Thanks for your time.
×
×
  • Create New...

Important Information

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