-
-
Notifications
You must be signed in to change notification settings - Fork 26
Simple ARS System #1627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Simple ARS System #1627
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
fuk oyu
} | ||
|
||
// return the size of the template in blocks * 10 as the fuel cost | ||
StructureTemplate template = optional.get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats silly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fuel cost stuff should be provided by the BasicArsStructure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or basically just any implementation
return (int) Math.min(volume, FuelHandler.TARDIS_MAX_FUEL); | ||
} | ||
|
||
default Optional<Identifier> structureIdOptional() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that doesnt make any sense
optionals exist to force people to handle nulls
whats the point of using an optional when you can just get a nullable id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for codec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just
do it in the codec then
you dont have to introduce a whole new method that is used in a codec of another class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either remove this method or remove the method which can return a nullable value
return this.text().getString(); | ||
} | ||
|
||
private static Text createNameText(Identifier id, String prefix) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use #toTranslationKey
?
is it to handle the /
(i dont rememer if they are handled by mc or not)?
if so, this method should be at TextUtils
.
} | ||
|
||
static { | ||
ServerPlayNetworking.registerGlobalReceiver(REQUEST_PLACE, (server, player, handler, buf, responseSender) -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally this piece of code should be in the handler
Identifier id = this.id(); | ||
|
||
return new Identifier(id.getNamespace(), "interiors/" + id.getPath()); | ||
} | ||
|
||
@Override | ||
public Identifier structureId() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???????????????????????????????????????????????
why does it just go to #getStructureLocation
?
import java.io.InputStreamReader; | ||
import java.util.concurrent.atomic.AtomicReference; | ||
|
||
public class JsonDecoder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should belong to modkit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally
in the future
"heh let's do node based blah blah" 🤓👆 |
perish |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
TODO /
About the PR
Why / Balance
Technical details
Media
Requirements
Breaking changes
Changelog