mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-20 20:32:14 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
891715b113 | ||
|
|
30a35ef25e | ||
|
|
33453b3b8c | ||
|
|
62e699f6d0 |
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 302 B |
Binary file not shown.
|
Before Width: | Height: | Size: 645 B After Width: | Height: | Size: 852 B |
-1
@@ -1,4 +1,3 @@
|
||||
matchTiles=sandstone_normal
|
||||
metadata=0
|
||||
method=top
|
||||
tiles=0
|
||||
+8
-3
@@ -17,16 +17,19 @@ public class MixinRenderGlobal_ItemRenderDist {
|
||||
|
||||
@Unique private static final int[] sodium$entityItemCount = new int[256];
|
||||
@Unique private static int sodium$itemRenderDist = 255;
|
||||
@Unique private static int sodium$itemRenderedCount;
|
||||
@Unique private static int sodium$itemLimit = Integer.MAX_VALUE;
|
||||
|
||||
@Inject(method = "renderEntities", at = @At(value = "FIELD", target = "Lnet/minecraft/client/renderer/RenderGlobal;countEntitiesRendered:I", ordinal = 0))
|
||||
private void sodium$resetEntitycount(CallbackInfo ci) {
|
||||
sodium$itemRenderedCount = 0;
|
||||
int entityCount = 0;
|
||||
boolean reachedLimit = false;
|
||||
final int itemLimit = AngelicaConfig.droppedItemLimit == 2048 ? Integer.MAX_VALUE : AngelicaConfig.droppedItemLimit;
|
||||
sodium$itemLimit = AngelicaConfig.droppedItemLimit == 2048 ? Integer.MAX_VALUE : AngelicaConfig.droppedItemLimit;
|
||||
for (int i = 0; i < sodium$entityItemCount.length; i++) {
|
||||
entityCount += sodium$entityItemCount[i];
|
||||
sodium$entityItemCount[i] = 0;
|
||||
if (!reachedLimit && entityCount > itemLimit) {
|
||||
if (!reachedLimit && entityCount > sodium$itemLimit) {
|
||||
reachedLimit = true;
|
||||
sodium$itemRenderDist = i == 0 ? 1 : i;
|
||||
}
|
||||
@@ -45,7 +48,9 @@ public class MixinRenderGlobal_ItemRenderDist {
|
||||
if (flag && entity instanceof EntityItem) {
|
||||
final int i = Math.min((int) (entity.getDistanceSq(d0, d1, d2) / 4.0D), 255);
|
||||
sodium$entityItemCount[i]++;
|
||||
return i <= sodium$itemRenderDist;
|
||||
final boolean doRender = i <= sodium$itemRenderDist && sodium$itemRenderedCount < sodium$itemLimit;
|
||||
if (doRender) sodium$itemRenderedCount++;
|
||||
return doRender;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
-1
@@ -30,7 +30,6 @@ public abstract class MixinEntityLivingBase extends Entity {
|
||||
vec31.rotateAroundX(-rotationPitch * 3.1415927F / 180.0F);
|
||||
vec31.rotateAroundY(-rotationYaw * 3.1415927F / 180.0F);
|
||||
vec31 = vec31.addVector(posX, posY + (double)getEyeHeight(), posZ);
|
||||
NotFine.logger.info("Item broken, calling IWorldSpawnItemBreakParticle spawnItemBreakParticle");
|
||||
((IWorldSpawnItemBreakParticle)worldObj).spawnItemBreakParticle(itemStack,
|
||||
"iconcrack_" + Item.getIdFromItem(itemStack.getItem()),
|
||||
vec31.xCoord, vec31.yCoord, vec31.zCoord, vec3.xCoord, vec3.yCoord + 0.05, vec3.zCoord);
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
@Mixin(value = RenderItem.class)
|
||||
@Mixin(value = RenderItem.class, priority = 900)
|
||||
public abstract class MixinRenderItem {
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user