Skip to content

Commit

Permalink
Update to BTA 7.1!
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSVK12 committed Apr 12, 2024
1 parent 94200d1 commit 86c4fbe
Show file tree
Hide file tree
Showing 26 changed files with 41 additions and 79 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,11 @@ dependencies {
implementation project(path: ":catalyst:multiblocks",configuration: "namedElements")
implementation project(path: ":catalyst:effects",configuration: "namedElements")

implementation project(path: ":retrostorage",configuration: "namedElements")

modImplementation "DragonFly:dragonfly:${project.dragonfly_version}"
modImplementation "BTWaila:btwaila:${project.btwaila_version}"
modImplementation "TerrainAPI:terrainapi:${project.terrain_api_version}"
//modImplementation "retrostorage:retrostorage:1.3.0"

implementation "org.slf4j:slf4j-api:1.8.0-beta4"
implementation "org.apache.logging.log4j:log4j-slf4j18-impl:2.16.0"
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
org.gradle.jvmargs=-Xmx2G

# BTA
bta_version=7.1-pre2a
bta_version=7.1

# Loader
loader_version=0.15.6-babric.4-bta

# Mods
halplibe_version=3.5.1
modmenu_version=2.0.4
halplibe_version=3.5.2
modmenu_version=2.0.5
dragonfly_version=1.4.7-7.1
btwaila_version=1.0.9-7.1
terrain_api_version=1.4.4-7.1
Expand Down
4 changes: 3 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ include(":catalyst:fluids")
include(":catalyst:multiblocks")
include(":catalyst:effects")
include(":catalyst:all")
include(":retrostorage")

project(":catalyst").projectDir = file("${rootProject.projectDir}/../catalyst")
project(":catalyst:energy").projectDir = file("${project(":catalyst").projectDir}/energy")
project(":catalyst:fluids").projectDir = file("${project(":catalyst").projectDir}//fluids")
project(":catalyst:multiblocks").projectDir = file("${project(":catalyst").projectDir}/multiblocks")
project(":catalyst:effects").projectDir = file("${project(":catalyst").projectDir}/effects")
project(":catalyst:all").projectDir = file("${project(":catalyst").projectDir}/all")
project(":catalyst:all").projectDir = file("${project(":catalyst").projectDir}/all")
project(":retrostorage").projectDir = file("${rootProject.projectDir}/../retrostorage")
Original file line number Diff line number Diff line change
Expand Up @@ -1415,8 +1415,8 @@ private void addEntities(){
EntityHelper.Core.createTileEntity(TileEntityPump.class,"Pump");
addToNameGuiMap("Pump", GuiPump.class, TileEntityCrystalChamber.class);

EntityHelper.Core.createSpecialTileEntity(TileEntityAssembler.class, new RenderAssemblerItemSprite3D(),"Assembler");
addToNameGuiMap("Assembler", GuiAssembler.class, TileEntityAssembler.class);
EntityHelper.Core.createSpecialTileEntity(TileEntityAssembler.class, new RenderAssemblerItemSprite3D(),"SI Assembler");
addToNameGuiMap("SI Assembler", GuiAssembler.class, TileEntityAssembler.class);

EntityHelper.Core.createSpecialTileEntity(TileEntityStorageContainer.class, new RenderStorageContainer(),"Storage Container");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ public void lerpMotion(double xd, double yd, double zd) {

@Override
public void tick() {
this.xOld = this.x;
this.yOld = this.y;
this.zOld = this.z;
this.xo = this.x;
this.yo = this.y;
this.zo = this.z;
super.tick();
if (this.shakeSnowball > 0) {
--this.shakeSnowball;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ protected void renderForeground(RenderEngine re, FontRenderer fr, int x, int y,
ticks++;
for (SlotGuidebook slot : slots) {
if(slot.item != null){
slot.discovered = mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0;
slot.setDiscovered(mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0);
}
if(mc.thePlayer.gamemode == Gamemode.creative) slot.discovered = true;
if(mc.thePlayer.gamemode == Gamemode.creative) slot.setDiscovered(true);
if(ticks > 100) {
slot.showRandomItem();
if(slots.get(slots.size()-1) == slot){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ protected void renderForeground(RenderEngine re, FontRenderer fr, int x, int y,
ticks++;
for (SlotGuidebook slot : slots) {
if(slot.item != null){
slot.discovered = mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0;
slot.setDiscovered(mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0);
}
if(mc.thePlayer.gamemode == Gamemode.creative) slot.discovered = true;
if(mc.thePlayer.gamemode == Gamemode.creative) slot.setDiscovered(true);
if(ticks > 100) {
slot.showRandomItem();
if(slots.get(slots.size()-1) == slot){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ protected void renderForeground(RenderEngine re, FontRenderer fr, int x, int y,
ticks++;
for (SlotGuidebook slot : slots) {
if(slot.item != null){
slot.discovered = mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0;
slot.setDiscovered(mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0);
}
if(mc.thePlayer.gamemode == Gamemode.creative) slot.discovered = true;
if(mc.thePlayer.gamemode == Gamemode.creative) slot.setDiscovered(true);
if(ticks > 100) {
slot.showRandomItem();
if(slots.get(slots.size()-1) == slot){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ protected void renderForeground(RenderEngine re, FontRenderer fr, int x, int y,
ticks++;
for (SlotGuidebook slot : slots) {
if(slot.item != null){
slot.discovered = mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0;
slot.setDiscovered(mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0);
}
if(mc.thePlayer.gamemode == Gamemode.creative) slot.discovered = true;
if(mc.thePlayer.gamemode == Gamemode.creative) slot.setDiscovered(true);
if(ticks > 100) {
slot.showRandomItem();
if(slots.get(slots.size()-1) == slot){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ protected void renderForeground(RenderEngine re, FontRenderer fr, int x, int y,
ticks++;
for (SlotGuidebook slot : slots) {
if(slot.item != null){
slot.discovered = mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0;
slot.setDiscovered(mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0);
}
if(mc.thePlayer.gamemode == Gamemode.creative) slot.discovered = true;
if(mc.thePlayer.gamemode == Gamemode.creative) slot.setDiscovered(true);
if(ticks > 100) {
slot.showRandomItem();
if(slots.get(slots.size()-1) == slot){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ protected void renderForeground(RenderEngine re, FontRenderer fr, int x, int y,
ticks++;
for (SlotGuidebook slot : slots) {
if(slot.item != null){
slot.discovered = mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0;
slot.setDiscovered(mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0);
}
if(mc.thePlayer.gamemode == Gamemode.creative) slot.discovered = true;
if(mc.thePlayer.gamemode == Gamemode.creative) slot.setDiscovered(true);
if(ticks > 100) {
slot.showRandomItem();
if(slots.get(slots.size()-1) == slot){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ protected void renderForeground(RenderEngine re, FontRenderer fr, int x, int y,
ticks++;
for (SlotGuidebook slot : slots) {
if(slot.item != null){
slot.discovered = mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0;
slot.setDiscovered(mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0);
}
if(mc.thePlayer.gamemode == Gamemode.creative) slot.discovered = true;
if(mc.thePlayer.gamemode == Gamemode.creative) slot.setDiscovered(true);
if(ticks > 100) {
slot.showRandomItem();
if(slots.get(slots.size()-1) == slot){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ protected void renderForeground(RenderEngine re, FontRenderer fr, int x, int y,
ticks++;
for (SlotGuidebook slot : slots) {
if(slot.item != null){
slot.discovered = mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0;
slot.setDiscovered(mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0);
}
if(mc.thePlayer.gamemode == Gamemode.creative) slot.discovered = true;
if(mc.thePlayer.gamemode == Gamemode.creative) slot.setDiscovered(true);
if(ticks > 100) {
slot.showRandomItem();
if(slots.get(slots.size()-1) == slot){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ protected void renderForeground(RenderEngine re, FontRenderer fr, int x, int y,
ticks++;
for (SlotGuidebook slot : slots) {
if(slot.item != null){
slot.discovered = mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0;
slot.setDiscovered(mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0);
}
if(mc.thePlayer.gamemode == Gamemode.creative) slot.discovered = true;
if(mc.thePlayer.gamemode == Gamemode.creative) slot.setDiscovered(true);
if(ticks > 100) {
slot.showRandomItem();
if(slots.get(slots.size()-1) == slot){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ protected void renderForeground(RenderEngine re, FontRenderer fr, int x, int y,
ticks++;
for (SlotGuidebook slot : slots) {
if(slot.item != null){
slot.discovered = mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0;
slot.setDiscovered(mc.statsCounter.readStat(StatList.pickUpItemStats[slot.item.itemID]) > 0);
}
if(mc.thePlayer.gamemode == Gamemode.creative) slot.discovered = true;
if(mc.thePlayer.gamemode == Gamemode.creative) slot.setDiscovered(true);
if(ticks > 100) {
slot.showRandomItem();
if(slots.get(slots.size()-1) == slot){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
public interface INBTCompound {
void removeTag(String s);

boolean equals(CompoundTag tag);
}
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ private Direction pickRandomExitDirection(List<Map.Entry<Direction, TileEntity>>
}
} else if (exitEntry.getValue() instanceof TileEntityStorageContainer) {
TileEntityStorageContainer container = (TileEntityStorageContainer) exitEntry.getValue();
if (container.contents == null || (container.contents.isItemEqual(stack) && ((INBTCompound) container.contents.getData()).equals(stack.getData()) && container.contents.stackSize < container.capacity)) {
if (container.contents == null || (container.contents.isItemEqual(stack) && container.contents.getData().equals(stack.getData()) && container.contents.stackSize < container.capacity)) {
return exitEntry.getKey();
}
blockedDirs.add(exitEntry.getKey());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public boolean insertStack(ItemStack stack) {
}
} else {
if(!(contents.isItemEqual(stack))) return false;
if(!((INBTCompound)contents.getData()).equals(stack.getData())) return false;
if(!(contents.getData()).equals(stack.getData())) return false;
if(contents.stackSize >= capacity) return false;
if(contents.stackSize+stack.stackSize > capacity){
int remainder = (contents.stackSize+stack.stackSize) - capacity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public TileEntityAssembler() {

@Override
public String getInvName() {
return "Assembler";
return "SI Assembler";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import net.minecraft.core.entity.Entity;
import net.minecraft.core.entity.EntityLiving;
import net.minecraft.core.entity.EntityTrackerEntry;
import net.minecraft.core.net.packet.Packet;
import net.minecraft.core.net.packet.Packet23VehicleSpawn;
import net.minecraft.server.entity.EntityTrackerEntry;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,4 @@ public void getDamageVsEntity(Entity entity, CallbackInfoReturnable<Integer> cir
}
}

@Inject(
method = "canStackWith",
at = @At(value = "INVOKE",target = "Lcom/mojang/nbt/CompoundTag;getTag(Ljava/lang/String;)Lcom/mojang/nbt/Tag;",ordinal = 0),
locals = LocalCapture.CAPTURE_FAILHARD,
cancellable = true
)
public void canStackWith(ItemStack itemStack, CallbackInfoReturnable<Boolean> cir, CompoundTag nbt1, CompoundTag nbt2, Map data1, Map data2, Iterator var6, String key) {
if(!nbt1.containsKey(key) || !nbt2.containsKey(key)){
cir.setReturnValue(false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,4 @@ public void removeTag(String s){
this.getValue().remove(s);
}

@Override
public boolean equals(CompoundTag tag) {
HashMap<?,?> otherTagMap;
otherTagMap = (HashMap<?, ?>) tag.getValue();//(HashMap<?, ?>) RetroStorage.getPrivateValue(tag.getClass(),tag,"tagMap");
if(otherTagMap == null){
otherTagMap = new HashMap<>();
}
if(getValue().isEmpty() && otherTagMap.isEmpty()){
return true;
}
if(getValue().isEmpty()){
return false;
} else if (otherTagMap.isEmpty()){
return false;
}
int s = 0;
for (Map.Entry<?, ?> entry : ((HashMap<?,?>)getValue()).entrySet()) {
Object K = entry.getKey();
Object V = entry.getValue();
if(tag.containsKey((String) K)){
if(V.equals(otherTagMap.get(K))){
s++;
}
}
}
return s == getValue().size();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public void handleVehicleSpawn(Packet23VehicleSpawn packet23vehiclespawn, Callba
obj.xRot = packet23vehiclespawn.pitch;
obj.id = packet23vehiclespawn.entityId;
this.worldClient.func_712_a(packet23vehiclespawn.entityId, obj);
if (packet23vehiclespawn.field_28044_i > 0) {
obj.setPos((double)packet23vehiclespawn.field_28047_e / 8000.0, (double)packet23vehiclespawn.field_28046_f / 8000.0, (double)packet23vehiclespawn.field_28045_g / 8000.0);
if (packet23vehiclespawn.ownerId > 0) {
obj.setPos((double)packet23vehiclespawn.xVelocity / 8000.0, (double)packet23vehiclespawn.yVelocity / 8000.0, (double)packet23vehiclespawn.zVelocity / 8000.0);
}
ci.cancel();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void doRenderItem(EntityItem entity, double d, double d1, double d2, floa
float f13 = 0.5f;
float f14 = 0.25f;
if (true) {
int k = Item.itemsList[itemstack.itemID].getColorFromDamage(itemstack.getMetadata());
int k = 0xFFFFFF;//Item.itemsList[itemstack.itemID].getColorFromDamage(itemstack.getMetadata());
float f15 = (float)(k >> 16 & 0xFF) / 255.0f;
float f17 = (float)(k >> 8 & 0xFF) / 255.0f;
float f19 = (float)(k & 0xFF) / 255.0f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void doRenderItem(ItemStack itemstack, double d, double d1, double d2, fl
float f13 = 0.5f;
float f14 = 0.25f;
if (true) {
int k = Item.itemsList[itemstack.itemID].getColorFromDamage(itemstack.getMetadata());
int k = 0xFFFFFF;//Item.itemsList[itemstack.itemID].getColorFromDamage(itemstack.getMetadata());
float f15 = (float)(k >> 16 & 0xFF) / 255.0f;
float f17 = (float)(k >> 8 & 0xFF) / 255.0f;
float f19 = (float)(k & 0xFF) / 255.0f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public void render(ItemStack itemStack, int x, int y, boolean isSelected, Slot s
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glEnable(32826);
if (slot != null) {
discovered = slot.discovered;
int iconIndex = slot.getBackgroundIconIndex();
if (iconIndex >= 0 && itemStack == null) {
GL11.glDisable(2896);
Expand Down

0 comments on commit 86c4fbe

Please sign in to comment.