mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-12 08:48:09 +07:00
Various bugfixes
This commit is contained in:
@ -277,6 +277,7 @@ public class Mods implements Loadable{
|
|||||||
|
|
||||||
/** Creates all the content found in mod files. */
|
/** Creates all the content found in mod files. */
|
||||||
public void loadContent(){
|
public void loadContent(){
|
||||||
|
|
||||||
for(LoadedMod mod : loaded){
|
for(LoadedMod mod : loaded){
|
||||||
safeRun(mod, () -> {
|
safeRun(mod, () -> {
|
||||||
if(mod.root.child("content").exists()){
|
if(mod.root.child("content").exists()){
|
||||||
|
@ -96,6 +96,7 @@ public class ModsDialog extends FloatingDialog{
|
|||||||
anyDisabled = true;
|
anyDisabled = true;
|
||||||
table.row();
|
table.row();
|
||||||
table.addImage().growX().height(4f).pad(6f).color(Pal.gray);
|
table.addImage().growX().height(4f).pad(6f).color(Pal.gray);
|
||||||
|
table.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
table.table(Styles.black6, t -> {
|
table.table(Styles.black6, t -> {
|
||||||
|
@ -413,12 +413,12 @@ public class Conveyor extends Block implements Autotiler{
|
|||||||
static long toLong(int value){
|
static long toLong(int value){
|
||||||
byte[] values = Pack.bytes(value, writeByte);
|
byte[] values = Pack.bytes(value, writeByte);
|
||||||
|
|
||||||
byte itemid = values[0];
|
short itemid = content.item(values[0]).id;
|
||||||
float x = values[1] / 127f;
|
float x = values[1] / 127f;
|
||||||
float y = ((int)values[2] + 128) / 255f;
|
float y = ((int)values[2] + 128) / 255f;
|
||||||
|
|
||||||
short[] shorts = writeShort;
|
short[] shorts = writeShort;
|
||||||
shorts[0] = (short)itemid;
|
shorts[0] = itemid;
|
||||||
shorts[1] = (short)(x * Short.MAX_VALUE);
|
shorts[1] = (short)(x * Short.MAX_VALUE);
|
||||||
shorts[2] = (short)((y - 1f) * Short.MAX_VALUE);
|
shorts[2] = (short)((y - 1f) * Short.MAX_VALUE);
|
||||||
return Pack.longShorts(shorts);
|
return Pack.longShorts(shorts);
|
||||||
|
Reference in New Issue
Block a user