schrum2 / EvoCraft-SCOPE

0 stars 0 forks source link

Command blocks removing drops #45

Closed richeyme closed 2 years ago

richeyme commented 2 years ago

First I'm going to be going into server properties and allowing for the use of command blocks. Then I'm going to find a way to spawn it in either with the in game control because I think that's going to be easier since there are already buttons and switches that could activate the command block. I'm thinking of using a redstone repeater so that it will delay the activation until all the new generations are spawned in. I'll definitely be playing around with this to see what works best.

richeyme commented 2 years ago

This seems like it's going to be a bit harder than I thought it would be. I realized that I may only just be able to spawn in the command block, but it won't have any commands already set in them. That may mean that I may just need to spawn them in myself and write in the commands and then figure out a way to save this in the world so that this doesn't have to be done every time.

richeyme commented 2 years ago

Repeater command blocks seem to be the best for removing the dropped items on the floor since you can set it to be unconditional and it does not need redstone to be active.

Here I have two command blocks, one that is clearing the drops and the other one is "silencing" the command block, meaning that all the commands that are executing won't appear in the chat 2022-05-26_15 32 21

schrum2 commented 2 years ago

So, I believe that all of the content in a Minecraft world gets stored in the world subdirectory. If you delete than then start the server, you start in a fresh world. I think that we could set up a baseline starting world and actually include the minimal required parts of it in our repo. In fact, we should probably include the java server as well (that will be a different issue that I will also assign to you). That starting world can have the command blocks pre-loaded.

richeyme commented 2 years ago

So I found out that the code for command blocks can be written in notepad++, which makes it easier to see a lot more lines of code instead of just the one. I was also seeing that there are listeners too, there is a video that shows that it can detect when a player has right clicked a specific button

richeyme commented 2 years ago

I completed this one by following the instructions from #69