shift from uuid to EntityPlayerMP

ok maybe we shouldn't support building stuff for someone offline yet
This commit is contained in:
Glease committed 2022-07-09 03:09:19 +08:00
1 parent 4a7051ab63
commit 5e66f6b8aa
12 files changed
+98 -103

No files matched your search

@@ -1,6 +1,7 @@
package com.gtnewhorizon.structurelib.structure;
import com.gtnewhorizon.structurelib.structure.IStructureElement.PlaceResult;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -10,16 +11,16 @@ class SurvivalBuildStructureWalker<T> implements IStructureWalker<T> {
private final T object;
private final ItemStack trigger;
private final IItemSource source;
private final UUID actorProfile;
private final EntityPlayerMP actor;
private final int elementBudget;
private final boolean check;
private int built;
public SurvivalBuildStructureWalker(T object, ItemStack trigger, IItemSource source, UUID actorProfile, int elementBudget, boolean check) {
public SurvivalBuildStructureWalker(T object, ItemStack trigger, IItemSource source, EntityPlayerMP actor, int elementBudget, boolean check) {
this.object = object;
this.trigger = trigger;
this.source = source;
this.actorProfile = actorProfile;
this.actor = actor;
this.elementBudget = elementBudget;
this.check = check;
built = 0;
@@ -27,7 +28,7 @@ class SurvivalBuildStructureWalker<T> implements IStructureWalker<T> {
@Override
public boolean visit(IStructureElement<T> element, World world, int x, int y, int z) {
PlaceResult placeResult = element.survivalPlaceBlock(object, world, x, y, z, trigger, source, actorProfile);
PlaceResult placeResult = element.survivalPlaceBlock(object, world, x, y, z, trigger, source, actor);
switch (placeResult) {
case SKIP:
return true;