mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-23 16:49:10 +00:00
Change Java whitespace handling in .editorconfig (#425)
* Change whitespace handling in .editorconfig * Reformat code * fix format error * Reformat code --------- Co-authored-by: Zoë Gidiere <duplexsys@protonmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@ public class MutatedStructure implements Structure, Keyed<MutatedStructure> {
|
||||
private final Structure base;
|
||||
private final ReadInterceptor readInterceptor;
|
||||
private final WriteInterceptor writeInterceptor;
|
||||
|
||||
|
||||
public MutatedStructure(RegistryKey key, Structure base,
|
||||
ReadInterceptor readInterceptor, WriteInterceptor writeInterceptor) {
|
||||
this.key = key;
|
||||
@@ -25,20 +25,20 @@ public class MutatedStructure implements Structure, Keyed<MutatedStructure> {
|
||||
this.readInterceptor = readInterceptor;
|
||||
this.writeInterceptor = writeInterceptor;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public RegistryKey getRegistryKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean generate(Vector3Int location, WritableWorld world, Random random, Rotation rotation) {
|
||||
return base.generate(location,
|
||||
world
|
||||
.buffer()
|
||||
.read(readInterceptor)
|
||||
.write(writeInterceptor)
|
||||
.build(),
|
||||
random, rotation);
|
||||
world
|
||||
.buffer()
|
||||
.read(readInterceptor)
|
||||
.write(writeInterceptor)
|
||||
.build(),
|
||||
random, rotation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,21 +11,21 @@ import com.dfsek.terra.api.util.reflection.TypeKey;
|
||||
|
||||
public class MutatedStructureConfigType implements ConfigType<MutatedStructureTemplate, MutatedStructure> {
|
||||
private final BaseAddon addon;
|
||||
|
||||
|
||||
public MutatedStructureConfigType(BaseAddon addon) {
|
||||
this.addon = addon;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public MutatedStructureTemplate getTemplate(ConfigPack pack, Platform platform) {
|
||||
return new MutatedStructureTemplate();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ConfigFactory<MutatedStructureTemplate, MutatedStructure> getFactory() {
|
||||
return new MutatedStructureFactory(addon);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TypeKey<MutatedStructure> getTypeKey() {
|
||||
return TypeKey.of(MutatedStructure.class);
|
||||
|
||||
@@ -10,16 +10,16 @@ import com.dfsek.terra.api.config.ConfigFactory;
|
||||
|
||||
public class MutatedStructureFactory implements ConfigFactory<MutatedStructureTemplate, MutatedStructure> {
|
||||
private final BaseAddon addon;
|
||||
|
||||
|
||||
public MutatedStructureFactory(BaseAddon addon) {
|
||||
this.addon = addon;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public MutatedStructure build(MutatedStructureTemplate config, Platform platform) throws LoadException {
|
||||
return new MutatedStructure(addon.key(config.getID()),
|
||||
config.getDelegate(),
|
||||
config.getReadInterceptor(),
|
||||
config.getWriteInterceptor());
|
||||
config.getDelegate(),
|
||||
config.getReadInterceptor(),
|
||||
config.getWriteInterceptor());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,19 +11,19 @@ import com.dfsek.terra.api.inject.annotations.Inject;
|
||||
public class StructureMutatorAddon implements AddonInitializer {
|
||||
@Inject
|
||||
private Platform platform;
|
||||
|
||||
|
||||
@Inject
|
||||
private BaseAddon addon;
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
platform.getEventManager()
|
||||
.getHandler(FunctionalEventHandler.class)
|
||||
.register(addon, ConfigPackPreLoadEvent.class)
|
||||
.then(event -> {
|
||||
event.getPack().registerConfigType(new MutatedStructureConfigType(addon), addon.key("MUTATED_STRUCTURE"), 499);
|
||||
})
|
||||
.failThrough();
|
||||
.getHandler(FunctionalEventHandler.class)
|
||||
.register(addon, ConfigPackPreLoadEvent.class)
|
||||
.then(event -> {
|
||||
event.getPack().registerConfigType(new MutatedStructureConfigType(addon), addon.key("MUTATED_STRUCTURE"), 499);
|
||||
})
|
||||
.failThrough();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,29 +11,29 @@ import com.dfsek.terra.api.world.util.WriteInterceptor;
|
||||
public class MutatedStructureTemplate implements AbstractableTemplate {
|
||||
@Value("id")
|
||||
private String id;
|
||||
|
||||
|
||||
@Value("mutate.read")
|
||||
private ReadInterceptor readInterceptor;
|
||||
|
||||
|
||||
@Value("mutate.write")
|
||||
private WriteInterceptor writeInterceptor;
|
||||
|
||||
|
||||
@Value("structure")
|
||||
private Structure delegate;
|
||||
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
public ReadInterceptor getReadInterceptor() {
|
||||
return readInterceptor;
|
||||
}
|
||||
|
||||
|
||||
public WriteInterceptor getWriteInterceptor() {
|
||||
return writeInterceptor;
|
||||
}
|
||||
|
||||
|
||||
public Structure getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user