Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/7.1' into 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSVK12 committed Mar 28, 2024
2 parents 0c1a379 + 997478a commit 41dda9b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 26 deletions.
16 changes: 7 additions & 9 deletions src/main/java/turniplabs/halplibe/helper/BlockBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import net.minecraft.client.render.block.model.BlockModel;
import net.minecraft.client.render.block.model.BlockModelDispatcher;
import net.minecraft.core.block.Block;
import net.minecraft.core.block.BlockFire;
import net.minecraft.core.block.tag.BlockTags;
import net.minecraft.core.data.tag.Tag;
import net.minecraft.core.item.Item;
import net.minecraft.core.item.block.ItemBlock;
Expand All @@ -13,17 +15,13 @@
import net.minecraft.core.util.helper.Side;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import turniplabs.halplibe.mixin.accessors.BlockFireAccessor;

import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class BlockBuilder implements Cloneable {
public static final Set<Integer> infiniburnList = new TreeSet<>();
static {
infiniburnList.add(Block.netherrack.id);
}

private final String MOD_ID;
private Float hardness = null;
private Float resistance = null;
Expand Down Expand Up @@ -555,11 +553,11 @@ public <T extends Block> T build(T block) {
}

if (flammability != null) {
((BlockFireAccessor) Block.fire).callSetBurnRate(block.id, flammability[0], flammability[1]);
BlockFire.setBurnRate(block.id, flammability[0], flammability[1]);
}

if (infiniburn) {
infiniburnList.add(block.id);
block.withTags(BlockTags.INFINITE_BURN);
}

if (visualUpdateOnMetadata) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/turniplabs/halplibe/helper/EntityHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import net.minecraft.client.render.tileentity.TileEntityRenderer;
import net.minecraft.core.block.entity.TileEntity;
import net.minecraft.core.entity.Entity;
import turniplabs.halplibe.mixin.accessors.EntityListAccessor;
import net.minecraft.core.entity.EntityDispatcher;
import turniplabs.halplibe.mixin.accessors.RenderManagerAccessor;
import turniplabs.halplibe.mixin.accessors.TileEntityAccessor;
import turniplabs.halplibe.mixin.accessors.TileEntityRendererAccessor;
Expand Down Expand Up @@ -44,7 +44,7 @@ public static void createSpecialTileEntity(Class<? extends TileEntity> clazz, Ti
*/
public static class Core {
public static void createEntity(Class<? extends Entity> clazz, int id, String name) {
EntityListAccessor.callAddMapping(clazz, name, id);
EntityDispatcher.addMapping(clazz, name, id);
}
public static void createTileEntity(Class<? extends TileEntity> clazz, String name) {
TileEntityAccessor.callAddMapping(clazz, name);
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions src/main/java/turniplabs/halplibe/util/BlockCoords.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public static void markSectionUsed(int[] topLeft, int[] bottomRight){
markSectionUsed(new int[]{16,24}, new int[]{19, 31});
markSectionUsed(new int[]{5,17}, new int[]{6, 24});
markSectionUsed(new int[]{7,18}, new int[]{10, 20});
markIDUsed(5, 16);
markIDUsed(15, 16);
markIDUsed(16, 16);
markIDUsed(18, 8);
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/halplibe.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"accessors.BlockFireAccessor",
"accessors.EntityFireflyFXAccessor",
"accessors.EntityFXAccessor",
"accessors.EntityListAccessor",
"accessors.LanguageAccessor",
"accessors.RecipeSymbolAccessor",
"accessors.TileEntityAccessor",
Expand Down

0 comments on commit 41dda9b

Please sign in to comment.